-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
93 lines (74 loc) · 1.96 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
worker_processes 1;
master_process on;
daemon on;
worker_rlimit_core 102400000;
working_directory /tmp;
#error_log logs/error.log debug;
error_log logs/error.log error;
nlog 0.0.0.0:5001 127.0.0.1:5151;
custom_log 0.0.0.0:5006 127.0.0.1:5151;
events {
worker_connections 10240;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr $time_iso8601 $msec $request_time $request_length '
'$connection $connection_requests $uri "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" ';
access_log logs/access.log main;
access_nlog 0.0.0.0:5002 127.0.0.1:5151;
log_subrequest on;
include *backend.conf;
keepalive_timeout 100;
keepalive_requests 1024;
client_header_timeout 100;
client_body_timeout 100;
lua_package_path '/usr/local/nginx/conf/?.lua;/usr/local/nginx/lua/lib/lua/5.1/?.lua;;';
lua_package_cpath '/usr/local/nginx/lua/lib/lua/5.1/?.so;;';
include *shm.conf;
max_number_of_channels 10;
max_messages_stored_per_channel 10000;
queue_shm_zone 200M;
server {
listen 80;
lua_check_client_abort on;
include *server.conf;
location =/add_queue {
channel_id $arg_id;
channel_key $arg_key;
add_queue;
}
location =/get_queue {
channel_id $arg_id;
channel_key $arg_key;
get_queue;
}
location =/delete_queue{
channel_id $arg_id;
delete_queue;
}
location =/statis_queue{
statis_queue;
}
location =/ping {
access_log off;
log_subrequest off;
if ($request_method != GET ) {
return 405;
}
content_by_lua 'ngx.exit(ngx.HTTP_OK)';
}
}
server {
listen 1800;
server_name 127.0.0.1;
location /nginx-status {
allow 127.0.0.1;
#deny all;
stub_status on;
access_log off;
}
}
}