39 lines
941 B
Nginx Configuration File
39 lines
941 B
Nginx Configuration File
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;
|
|
|
|
root /srv/nsupdate/htdocs/;
|
|
|
|
location / {
|
|
try_files $uri @nsupdate;
|
|
}
|
|
|
|
location @nsupdate {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
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;
|
|
}
|