diff options
author | saturneric <[email protected]> | 2025-07-05 17:49:46 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-07-05 17:49:46 +0000 |
commit | d04682736bc0580c2f0bf7f98e0a9f0173d7e6a5 (patch) | |
tree | 9e0ddc101bb844d7f6a142783ad870840c0c9d49 | |
parent | feat(nginx): add initial nginx configuration (diff) | |
download | Manual-d04682736bc0580c2f0bf7f98e0a9f0173d7e6a5.tar.gz Manual-d04682736bc0580c2f0bf7f98e0a9f0173d7e6a5.zip |
refactor(nginx): simplify location block and remove caching configuration
* Removed caching configuration for static files.
* Updated `try_files` directive to return a 404 error instead of redirecting to `index.html`.
-rw-r--r-- | nginx.conf | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -6,14 +6,8 @@ server { root /usr/share/nginx/html; index index.html index.htm; - location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|otf|webp)$ { - expires 30d; - access_log off; - add_header Cache-Control "public"; - } - location / { - try_files $uri $uri/ /index.html; + try_files $uri $uri/ =404; } error_page 404 /404.html; |