Commit fcb1a7b3 by zhangxingmin

push

parent 4bfd3389
# nginx.conf (调试版)
server { server {
listen 8333; listen 8333;
server_name localhost; server_name localhost;
...@@ -6,19 +5,29 @@ server { ...@@ -6,19 +5,29 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
# 详细错误日志
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug; # 开启debug日志
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate"; # 禁用缓存
}
location /cffp/ {
alias /usr/share/nginx/html/;
try_files $uri $uri/ /cffp/index.html;
}
# 临时允许目录列表(调试用) # 禁止访问 .env 文件
autoindex on; location ~ /\.env {
deny all;
return 404;
} }
# 防止vue-router路由被缓存 # 错误处理
location ~* \.(html)$ { error_page 500 502 503 504 /50x.html;
add_header Cache-Control "no-cache, must-revalidate"; location = /50x.html {
root /usr/share/nginx/html;
} }
# 访问日志
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment