-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
78 lines (60 loc) · 1.37 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
worker_processes 2;
error_log logs/error.log info;
daemon on;
worker_rlimit_nofile 1024;
events {
worker_connections 1024;
multi_accept on;
}
http {
charset UTF-8;
access_log logs/access.log;
access_log off;
# Timeouts
keepalive_timeout 60s;
client_header_timeout 60s;
client_body_timeout 60s;
send_timeout 60s;
# Proxy Settings
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_ssl_server_name on;
# IP Address
real_ip_header X-Forwarded-For;
set_real_ip_from 0.0.0.0/0;
real_ip_recursive on;
# Other Settings
client_max_body_size 0;
underscores_in_headers on;
reset_timedout_connection on;
tcp_nopush on;
include httptables/httptables.conf;
server {
server_name apis.t.com;
listen 0.0.0.0:8000;
location / {
default_type 'text/plain';
# Proxy
proxy_pass http://unix:logs/nginx.sock:/uri/;
}
}
server {
server_name apis.z.com;
listen 0.0.0.0:8001;
location / {
default_type 'text/plain';
# HttpTables Core
access_by_lua_file conf/httptables/lua/core.lua;
# Proxy
proxy_pass http://unix:logs/nginx.sock:/uri/;
}
}
server {
listen unix:logs/nginx.sock;
location ~ /.* {
default_type application/json;
echo '{"status":200, "message": "hello, httptables from unix-domain"}';
}
}
}