Skip to content

Commit 14c9f8d

Browse files
committed
2 parents 9178312 + 423f913 commit 14c9f8d

File tree

8 files changed

+27
-20
lines changed

8 files changed

+27
-20
lines changed

README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,48 @@
8080
└── js
8181
```
8282
## Openresty Installation
83-
+ Prerequisites:`apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential`
83+
+ Prerequisites:
84+
```
85+
apt-get install libreadline-dev libncurses5-dev libpcre3-dev \
86+
libssl-dev perl make build-essential
87+
```
8488
+ Building:
8589
```bash
86-
wget https://openresty.org/download/openresty-1.11.2.1.tar.gz
90+
wget https://openresty.org/download/openresty-1.11.2.3.tar.gz
8791
tar xvf openresty-1.11.2.1.tar.gz
8892
cd openresty-1.11.2.1
8993
./configure --prefix=/opt/openresty \
90-
--with-pcre-jit \
91-
--with-ipv6 \
94+
--with-luajit \
9295
--without-http_redis2_module \
9396
--with-http_iconv_module \
94-
--with-http_postgres_module \
95-
-j2
96-
make
97+
--with-http_postgres_module
98+
make -j2
9799
sudo make install
98100
```
99-
101+
+ error
102+
+ 错误1:`you need to have ldconfig in your PATH env when enabling luajit.`
103+
+ 解决办法:
104+
```bash
105+
sudo apt-get install luajit
106+
whereis luajit
107+
luajit: /usr/bin/luajit /usr/share/man/man1/luajit.1.gz
108+
109+
./configure --prefix=/opt/openresty \
110+
--with-luajit=/usr/bin/luajit \
111+
--without-http_redis2_module \
112+
--with-http_iconv_module \
113+
--with-http_postgres_module
114+
make -j2
115+
sudo make install
116+
```
100117
## nginx.conf, the Nginx web server configuration
101118
102119
```bash
103120
user www www;
104121
worker_processes 8;
105122
106123
pid logs/nginx.pid;
124+
error_log log/error.log error;
107125
worker_rlimit_nofile 204800;
108126
109127
events {

conf/domains/nginx_demo.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ server {
1414
listen 8080;
1515
server_name localhost;
1616
index index.php index.html index.htm;
17-
#access_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/demo_access.log;
18-
error_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/demo_error.log error;
1917
set $project_path /mnt/hgfs/Linux-Share/Lua/; # 定义项目根目录,如项目放在/home/www/
2018
set $web_root "${project_path}lua_project_v0.01/template/websocket";
2119

conf/domains/nginx_index.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ server {
55
charset utf8;
66
default_type text/html;
77
index chatroom.html index.htm;
8-
#access_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/index_access.log;
9-
error_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/index_error.log error;
108

119
#加载模板文件
1210
set $template_root "/mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/template";

conf/domains/nginx_live.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ server {
99
charset utf8;
1010
default_type text/html;
1111
index chatroom.html index.htm;
12-
#access_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/live_access.log;
13-
error_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/live_error.log error;
1412

1513
#加载直播模板
1614
set $project_path /mnt/hgfs/Linux-Share/Lua/; # 定义项目根目录,如项目放在/home/www/

conf/domains/nginx_product.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ server {
77
charset gbk;
88
index chatroom.html index.htm index.phtm;
99
set $project_path /mnt/hgfs/Linux-Share/Lua/;
10-
access_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/product_access.log;
11-
error_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/product_error.log error;
1210

1311
#加载模板文件
1412
set $project_path /mnt/hgfs/Linux-Share/Lua/; # 定义项目根目录,如项目放在/home/www/

conf/domains/upstream.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ server {
44
server_name 127.0.0.1;
55
charset utf8;
66
default_type application/json;
7-
#access_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/upstream_access.log;
8-
#error_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/upstream_error.log error;
97

108
proxy_set_header Host $http_host;
119
proxy_set_header X-Forwarded-Port $server_port;

conf/domains/waf.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ server {
55
listen 8082;
66
server_name localhost;
77
index index.php chatroom.html index.htm;
8-
#access_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/waf_access.log;
9-
#error_log /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/logs/waf_error.log error;
108

119
set $web_root /mnt/hgfs/Linux-Share/Lua/lua_project_v0.01/template/waf;
1210
root $web_root;

conf/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
user tinywan;
22
worker_processes 8;
33
pid logs/nginx.pid;
4+
error_log log/error.log error;
45
events {
56
use epoll;
67
worker_connections 1024;

0 commit comments

Comments
 (0)