aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-07-05 17:41:55 +0000
committersaturneric <[email protected]>2025-07-05 17:41:55 +0000
commit7d4c7af84c5c4a1c986e1c957c718c97dd96ea51 (patch)
treef8bd69dd759e9f557cd4d498e6a3559ce853e360
parentrefactor(docker): improve Dockerfile structure and nginx configuration (diff)
downloadManual-7d4c7af84c5c4a1c986e1c957c718c97dd96ea51.tar.gz
Manual-7d4c7af84c5c4a1c986e1c957c718c97dd96ea51.zip
feat(nginx): add initial nginx configuration
* Set up server to listen on port 80 * Define root directory and index files * Configure caching for static assets * Implement error handling for 404 pages
-rw-r--r--nginx.conf (renamed from nginx/nginx.conf)6
1 files changed, 6 insertions, 0 deletions
diff --git a/nginx/nginx.conf b/nginx.conf
index 822dd29..4b8416e 100644
--- a/nginx/nginx.conf
+++ b/nginx.conf
@@ -6,6 +6,12 @@ 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;
}