aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-07-05 17:49:46 +0000
committersaturneric <[email protected]>2025-07-05 17:49:46 +0000
commitd04682736bc0580c2f0bf7f98e0a9f0173d7e6a5 (patch)
tree9e0ddc101bb844d7f6a142783ad870840c0c9d49
parentfeat(nginx): add initial nginx configuration (diff)
downloadManual-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.conf8
1 files changed, 1 insertions, 7 deletions
diff --git a/nginx.conf b/nginx.conf
index 4b8416e..3217e80 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -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;