39 lines
941 B
Nginx Configuration File
Raw Permalink Normal View History

upstream nsupdate_server {
server unix:/srv/nsupdate/run/gunicorn.sock fail_timeout=0;
}
server {
listen 0.0.0.0:80;
listen [::]:80;
listen 0.0.0.0:443 ssl;
listen [::]:443 ssl;
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;
ssl_certificate /etc/ssl/local/nsupdate.info.pem;
ssl_certificate_key /etc/ssl/private/nsupdate.info.pem;
ssl_session_timeout 5m;
include ssl_params;
}