Files
machartaa_admin_dist/nginx.conf
T

28 lines
683 B
Nginx Configuration File
Raw Normal View History

2025-10-06 15:42:41 +03:30
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
2026-10-10 10:47:47 +03:30
# Hashed build assets must never fall back to index.html.
# Otherwise missing JS/CSS returns text/html and browsers throw MIME errors.
location /assets/ {
try_files $uri =404;
access_log off;
expires 1y;
add_header Cache-Control "public, immutable";
2025-10-06 15:42:41 +03:30
}
2026-10-10 10:47:47 +03:30
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|webp|woff2?|ttf|eot|webmanifest|map)$ {
try_files $uri =404;
access_log off;
expires 7d;
add_header Cache-Control "public";
}
location / {
try_files $uri $uri/ /index.html;
}
}