forked from jpf/requestbin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
55 lines (46 loc) · 1.35 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
daemon off;
events {
worker_connections 4096;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
#Virtual host accepting HTTP traffic
server {
listen 80 default;
client_max_body_size 4G;
charset utf-8;
server_name www.opsolutely.com opsolutely.com;
root /opt/code/requestbin;
include /etc/nginx/mime.types;
server_tokens off;
access_log /var/log/nginx/nginx.log;
error_log /var/log/nginx/nginx.log;
add_header P3P 'CP="NON CURa ADMa DEVa PSAa PSDa IVAa IVDa OUR IND COM NAV STA"';
location /robots.txt {
alias /var/www/robots.txt;
expires 12y;
log_not_found off;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:8000;
}
location / {
try_files $uri @proxy_to_app;
}
location /ping {
access_log off;
return 200 'ok';
add_header Content-Type text/plain;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /opt/code/requestbin/templates/;
}
}
}