Commit fcb1a7b3 by zhangxingmin

push

parent 4bfd3389
# nginx.conf (调试版)
server { server {
listen 8333; listen 8333;
server_name localhost; server_name localhost;
root /usr/share/nginx/html;
index index.html;
# 详细错误日志
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug; # 开启debug日志
location / {
try_files $uri $uri/ /index.html;
# 临时允许目录列表(调试用) root /usr/share/nginx/html;
autoindex on; index index.html;
}
location / {
# 防止vue-router路由被缓存 try_files $uri $uri/ /index.html;
location ~* \.(html)$ { add_header Cache-Control "no-store, no-cache, must-revalidate"; # 禁用缓存
add_header Cache-Control "no-cache, must-revalidate"; }
}
location /cffp/ {
alias /usr/share/nginx/html/;
try_files $uri $uri/ /cffp/index.html;
}
# 禁止访问 .env 文件
location ~ /\.env {
deny all;
return 404;
}
# 错误处理
error_page 500 502 503 504 /50x.html;
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