chevereto宝塔面板搭建反向代理设置
# Chevereto 主站反向代理
location / {
proxy_pass http://127.0.0.1:8080;
# 传递必要的头信息,避免 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;
}