40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
# PlotDirector-only vhost. Requires its certificate, map and maintenance snippet.
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name plotdirector.com www.plotdirector.com;
|
|
location ^~ /.well-known/acme-challenge/ { root /srv/plotdirector/acme; default_type text/plain; }
|
|
location / { return 301 https://plotdirector.com$request_uri; }
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name www.plotdirector.com;
|
|
ssl_certificate /etc/letsencrypt/live/plotdirector.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/plotdirector.com/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
return 301 https://plotdirector.com$request_uri;
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name plotdirector.com;
|
|
ssl_certificate /etc/letsencrypt/live/plotdirector.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/plotdirector.com/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
client_max_body_size 110m;
|
|
location ~* ^/_deployment(?:/|$) { return 404; }
|
|
location / {
|
|
include /etc/nginx/snippets/plotdirector-maintenance.conf;
|
|
proxy_pass http://127.0.0.1:5001;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $plotdirector_connection_upgrade;
|
|
proxy_read_timeout 3600s;
|
|
proxy_buffering off;
|
|
}
|
|
}
|