[Bug] 无法删除网站
Opened this issue · 6 comments
wanyunr commented
联系方式
No response
1Panel 版本
社区版: v1.10.21-lts
问题描述
反代时若设置了sni,此时删除反代的上游网站,则会导致无法删除反代服务器上的网站
表现未以下报错,但是在配置文件目录查看,配置文件已被删除,但是面板上还是显示有网站
报错:
服务内部错误: stderr: 2024/11/21 20:59:29 [emerg] 210#210: unknown "sni" variable nginx: [emerg] unknown "sni" variable
反代配置
location ^~ / {
set $sni "xxx.com;
proxy_pass https://1.1.1.1:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name on;
proxy_ssl_name $sni;
proxy_ssl_verify off;
add_header Strict-Transport-Security "max-age=31536000";
}
重现步骤
设置了sni,此时删除反代的上游网站,则会导致无法删除反代服务器上的网站
期待的正确结果
No response
相关日志输出
No response
附加信息
No response
zhengkunwang223 commented
能否贴一下你 sni 的网站完整配置
wanyunr commented
能否贴一下你 sni 的网站完整配置
已经没了,OpenResty删除重装了
配置就是使用默认的反代配置,没有手动添加配置,仅修改了反代配置
几个网站都是这样,都是使用的这个的反代配置
location ^~ / {
set $sni "xxx.com;
proxy_pass https://1.1.1.1:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name on;
proxy_ssl_name $sni;
proxy_ssl_verify off;
add_header Strict-Transport-Security "max-age=31536000";
}
zhengkunwang223 commented
wanyunr commented
zhengkunwang223 commented
wanyunr commented