49 lines
1021 B
Plaintext
49 lines
1021 B
Plaintext
|
server {
|
||
|
listen 80;
|
||
|
listen [::]:80;
|
||
|
|
||
|
server_name {{ pretalx_domain }};
|
||
|
|
||
|
location /.well-known/acme-challenge {
|
||
|
default_type "text/plain";
|
||
|
alias /var/www/acme-challenge;
|
||
|
}
|
||
|
|
||
|
location / {
|
||
|
return 301 https://{{ pretalx_domain }}$request_uri;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
listen [::]:443 ssl http2;
|
||
|
|
||
|
server_name {{ pretalx_domain }};
|
||
|
|
||
|
ssl_certificate_key /etc/nginx/ssl/{{ pretalx_domain }}.key;
|
||
|
ssl_certificate /etc/nginx/ssl/{{ pretalx_domain }}.crt;
|
||
|
|
||
|
add_header Referrer-Policy same-origin;
|
||
|
add_header X-Content-Type-Options nosniff;
|
||
|
|
||
|
location / {
|
||
|
proxy_pass http://localhost:8345;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-Forwarded-Proto https;
|
||
|
proxy_set_header Host $http_host;
|
||
|
}
|
||
|
|
||
|
location /media/ {
|
||
|
alias /opt/pretalx/data/media/;
|
||
|
expires 7d;
|
||
|
access_log off;
|
||
|
}
|
||
|
|
||
|
location /static/ {
|
||
|
alias /opt/pretalx/venv/lib/python3.11/site-packages/pretalx/static.dist/;
|
||
|
access_log off;
|
||
|
expires 365d;
|
||
|
add_header Cache-Control "public";
|
||
|
}
|
||
|
}
|