2026-08-23 14:24:47 +00:00
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
server_name _;
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
# Gzip compression
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
|
|
|
gzip_min_length 256;
|
|
|
|
|
|
|
|
|
|
# Static assets caching
|
|
|
|
|
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff2|ttf)$ {
|
|
|
|
|
expires 7d;
|
|
|
|
|
add_header Cache-Control "public, no-transform";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location / {
|
2026-08-23 14:42:11 +00:00
|
|
|
try_files $uri $uri/ =404;
|
2026-08-23 14:24:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Each subdirectory serves its page
|
|
|
|
|
location ~ ^/([^/]+)/ {
|
|
|
|
|
try_files $uri $uri/ /$1/index.html;
|
|
|
|
|
}
|
|
|
|
|
}
|