-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathnginx.conf
More file actions
57 lines (47 loc) · 1.52 KB
/
nginx.conf
File metadata and controls
57 lines (47 loc) · 1.52 KB
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
user simplified simplified;
worker_processes 1;
pid /var/run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
daemon off;
events {
worker_connections 1024;
# set to 'on' if worker_processes > 1
accept_mutex off;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format extended '[$time_local] $status REQUEST: "$request" REFERER: "$http_referer" '
'FWD_FOR "$http_x_forwarded_for" PROXY_HOST: "$proxy_host" UPSTREAM_ADDR: "$upstream_addr"';
access_log /var/log/nginx/access.log extended;
error_log /var/log/nginx/error.log error;
gzip on;
upstream circ_mngr_server {
# fail_timeout=0 means always retry an upstream even if it failed
# to return a good HTTP response
server 127.0.0.1:8000 fail_timeout=0;
}
server {
listen 80 deferred;
client_max_body_size 75M;
keepalive_timeout 5;
location = /favicon.ico {
return 204;
}
location / {
try_files $uri @proxy_to_app;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://circ_mngr_server;
}
}
}