35 lines
836 B
Nginx Configuration File
Raw Normal View History

upstream nsupdate_server {
server unix:/srv/nsupdate/run/gunicorn.sock fail_timeout=0;
}
server {
listen :80;
2013-11-09 21:17:52 +01:00
server_name www.nsupdate.info;
return 301 http://nsupdate.info$request_uri;
}
server {
listen :80;
listen [::]:80;
server_name nsupdate.info ipv4.nsupdate.info ipv6.nsupdate.info;
access_log /srv/nsupdate/logs/nginx-access.log;
error_log /srv/nsupdate/logs/nginx-error.log;
2013-11-09 21:17:52 +01:00
root /srv/nsupdate/htdocs/;
2013-11-09 21:17:52 +01:00
location / {
try_files $uri @nsupdate;
}
2013-11-09 21:17:52 +01:00
location @nsupdate {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2013-11-09 21:17:52 +01:00
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
2013-11-09 21:17:52 +01:00
proxy_pass http://nsupdate_server;
}
error_page 500 502 503 504 /500.html;
}