From db75a5fb74184d90a80851e46f6365f719f5591e Mon Sep 17 00:00:00 2001 From: UlricQin Date: Sun, 27 Sep 2020 19:57:43 +0800 Subject: [PATCH] modify nginx for static files --- etc/nginx.conf | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/etc/nginx.conf b/etc/nginx.conf index 3509b6b7..6d4207f6 100644 --- a/etc/nginx.conf +++ b/etc/nginx.conf @@ -103,28 +103,12 @@ http { rewrite / /mon; } - location /rdb { - root /home/n9e/pub; - index index.html; - try_files $uri /rdb/index.html; + location / { + try_files $uri /layout/index.html; } - location /ams { - root /home/n9e/pub; - index index.html; - try_files $uri /ams/index.html; - } - - location /job { - root /home/n9e/pub; - index index.html; - try_files $uri /job/index.html; - } - - location /mon { - root /home/n9e/pub; - index index.html; - try_files $uri /mon/index.html; + location ~ .*(.htm|.html|manifest.json)$ { + add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; } location /api/rdb {