Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 无法删除网站 #7148

Open
wanyunr opened this issue Nov 21, 2024 · 6 comments
Open

[Bug] 无法删除网站 #7148

wanyunr opened this issue Nov 21, 2024 · 6 comments
Assignees

Comments

@wanyunr
Copy link

wanyunr commented Nov 21, 2024

联系方式

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
Clip_2024-11-21_21-07-36

反代配置

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
Copy link
Contributor

能否贴一下你 sni 的网站完整配置

@wanyunr
Copy link
Author

wanyunr commented Nov 21, 2024

能否贴一下你 sni 的网站完整配置

已经没了,OpenResty删除重装了
配置就是使用默认的反代配置,没有手动添加配置,仅修改了反代配置
几个网站都是这样,都是使用的这个的反代配置
Clip_2024-11-21_22-15-25

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
Copy link
Contributor

如果是这种配置 应该是添加的时候就不支持的
image

@wanyunr
Copy link
Author

wanyunr commented Nov 21, 2024

如果是这种配置 应该是添加的时候就不支持的 image

先添加普通反代配置,再修改反代配置

@zhengkunwang223
Copy link
Contributor

image 我这样添加的源文 是可以删除的

@wanyunr
Copy link
Author

wanyunr commented Nov 22, 2024

image 我这样添加的源文 是可以删除的

把上游 8080端口的服务关了之后呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants