Files

28 lines
706 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 /_nuxt/ {
2026-09-27 08:54:48 +03:30
expires 1y;
add_header Cache-Control "public, immutable";
}
# mime.types پیش‌فرض nginx نوع webmanifest را ندارد
location = /manifest.webmanifest {
default_type application/manifest+json;
}
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;
}