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

apache 环境,删除绑定的域名没删除干净 #132

Open
yar999 opened this issue Apr 10, 2024 · 0 comments
Open

apache 环境,删除绑定的域名没删除干净 #132

yar999 opened this issue Apr 10, 2024 · 0 comments

Comments

@yar999
Copy link

yar999 commented Apr 10, 2024

环境, centos 7, apache做web服务器, 面板最新版 8.0.6

问题描述

/www/server/panel/vhost/apache/a.com.conf 的内容如下:

<VirtualHost *:80>
...
ServerAlias a.com b.com
...
</VirtualHost>
<VirtualHost *:443>
...
ServerAlias a.com b.com
...
</VirtualHost>

面板中删除 b.com 之后, /www/server/panel/vhost/apache/a.com.conf 的内容如下:

<VirtualHost *:80>
...
ServerAlias a.com
...
</VirtualHost>
<VirtualHost *:443>
...
ServerAlias a.com b.com
...
</VirtualHost>

<VirtualHost *:443> 这个虚拟主机下的 b.com 没有被删除

解决办法:

/www/server/panel/class/panelSite.py 的 1502 行 的

rep = r"\n*<VirtualHost \*\:" + port + ">(.|\n){500,1500}</VirtualHost>"
改成下面的就解决了
rep = r"\n*<VirtualHost \*\:" + port + ">(.|\n){500,3000}</VirtualHost>"

然后重启宝塔服务 /etc/init.d/bt restart 再删除就删除干净了

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

No branches or pull requests

1 participant