ansible/roles/pretalx/templates/vhost.j2

50 lines
1002 B
Plaintext
Raw Permalink Normal View History

2023-09-15 12:08:32 +02:00
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;
2024-01-29 19:02:08 +01:00
client_max_body_size 32M;
2023-09-15 12:08:32 +02:00
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/ {
2023-11-07 16:50:10 +01:00
alias /opt/pretalx/static/;
2023-09-15 12:08:32 +02:00
access_log off;
expires 365d;
add_header Cache-Control "public";
}
}