Fix nginx conf

This commit is contained in:
2026-02-03 03:05:25 +04:00
parent 5daba004ea
commit 79f259f496
4 changed files with 5 additions and 13 deletions

View File

@@ -4,21 +4,13 @@ server {
root /usr/share/nginx/html;
index index.html;
# Gzip compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
location ~ ^([^.\?]*[^/])$ {
return 301 $1/;
}
# Main location
location / {
try_files $uri $uri/ $uri.html /index.html;
}
# Error pages
error_page 404 /404.html;
}