Files

23 lines
545 B
Nginx Configuration File
Raw Permalink Normal View History

2026-09-27 08:54:48 +03:30
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location /_next/static/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
2026-09-27 09:17:53 +03:30
# $uri/index.html به‌جای $uri/ تا دایرکتوری / ریدایرکت ۳۰۱ نسازد
2026-09-27 08:54:48 +03:30
location / {
2026-09-27 09:17:53 +03:30
try_files $uri $uri.html $uri/index.html =404;
2026-09-27 08:54:48 +03:30
}
error_page 404 /404.html;
gzip on;
gzip_vary on;
gzip_types text/css application/javascript application/json image/svg+xml text/plain;
}