diff --git a/.github/workflows/nginx.conf b/.github/workflows/nginx.conf index dc62b59..565fde3 100644 --- a/.github/workflows/nginx.conf +++ b/.github/workflows/nginx.conf @@ -90,20 +90,8 @@ http { server_name 139.199.173.241; # location /docs 则最后不加/ # location /docs/ 则最后加/ - location / { - proxy_pass http://139.199.173.241:8680; - if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件 - { - add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; - } - # 把匹配到的路径重写, 注意要以/结尾 - alias /usr/share/nginx/html/docs/; - # 默认首页 - index index.html; - try_files $uri $uri/ /docs/index.html; - } location ~ /docs/ { - proxy_pass http://139.199.173.241:8680/docs/; + proxy_pass http://139.199.173.241:8680; if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件 { add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";