chevereto宝塔面板搭建反向代理设置
location / {
proxy_pass http://127.0.0.1:8080;
# 传递 Host 头信息,防止 Chevereto 识别错误
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 处理静态资源,防止 favicon.ico 重定向
location ~* \.(gif|png|jpg|jpeg|svg|css|js|woff|woff2|ttf|otf|eot|ico|webp)$ {
expires 7d;
access_log off;
proxy_pass http://110.42.98.77:8080;
}
# 禁止访问 PHP 源码文件(安全性)
location ~* /(app|lib|content)/.*\.(po|php|lock|sql)$ {
deny all;
}