2025-04-27 19:09:32 +02:00
|
|
|
server {
|
|
|
|
|
listen 8080;
|
2025-05-08 22:36:47 +02:00
|
|
|
%{ if tls ~}
|
|
|
|
|
listen 8443 ssl;
|
|
|
|
|
ssl_certificate /etc/ssl/certs/private/tls.crt;
|
|
|
|
|
ssl_certificate_key /etc/ssl/certs/private/tls.key;
|
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
|
|
%{ endif ~}
|
|
|
|
|
server_name ${fqdn};
|
2025-04-27 19:09:32 +02:00
|
|
|
gzip on;
|
|
|
|
|
gzip_comp_level 9;
|
|
|
|
|
gzip_types
|
|
|
|
|
text/html
|
|
|
|
|
text/plain
|
|
|
|
|
text/css
|
|
|
|
|
text/js
|
|
|
|
|
text/xml
|
|
|
|
|
text/javascript
|
|
|
|
|
application/javascript
|
|
|
|
|
application/json
|
|
|
|
|
application/xml
|
|
|
|
|
application/rss+xml
|
|
|
|
|
image/svg+xml;
|
|
|
|
|
root /tmp/site;
|
2025-05-08 22:36:47 +02:00
|
|
|
%{ if custom_snippet != "" ~}
|
|
|
|
|
${custom_snippet}
|
|
|
|
|
%{ endif ~}
|
2025-04-27 19:09:32 +02:00
|
|
|
location / {
|
|
|
|
|
index index.html index.htm;
|
|
|
|
|
}
|
|
|
|
|
location ~* ^/([^/]+) {
|
|
|
|
|
index index.html index.htm;
|
|
|
|
|
error_page 404 = @error;
|
|
|
|
|
}
|
|
|
|
|
error_page 404 /404.html;
|
|
|
|
|
location @error {
|
|
|
|
|
try_files /$1/404.html /404.html =404;
|
|
|
|
|
}
|
|
|
|
|
}
|