Confirmed working on BT Panel 13.2.0 — and in theory it'll keep working as long as BT Panel doesn't change the logic of the SSL issuance script.
First, find the reverse-proxied site you want to issue a cert for, click Settings on the right, then go to the config file, hit Enter after the <VirtualHost *:80> line, and paste this in:
<Location "/.well-known/acme-challenge/">
ProxyPass !
Require all granted
</Location>
Then exit the site settings, click Files, and open this path:
/www/server/panel/class
Find the file acme_v2.py, double-click it to open the editor, go to lines 2724-2726, and delete / comment out with # the following code:
if type(data) == list:
for x in data:
if x['type']: return public.returnMsg(False,'已开启反向代理的站点无法申请SSL!')
Then hit Save and you're done.
One heads-up: if you have the panel's tamper protection enabled, turn it off before editing acme_v2.py.
宝塔13.2.0可用,理论上只要宝塔不改ssl签发脚本逻辑就一直可用
首先,找到你要签发证书的反向代理站点,点击右边的设置,然后点击配置文件,在 <VirtualHost *:80> 这行后面回车,然后粘贴如下代码
<Location "/.well-known/acme-challenge/">
ProxyPass !
Require all granted
</Location>
之后退出站点设置,点击文件,然后打开如下路径
/www/server/panel/class
找到 acme_v2.py 这个文件,双击它进入编辑界面,找到2724-2726行,删除/用 # 注释掉如下代码
if type(data) == list:
for x in data:
if x['type']: return public.returnMsg(False,'已开启反向代理的站点无法申请SSL!')
然后点击保存即可
提醒下,如果开启了面板防篡改需要先关闭面板防篡改再修改acme_v2.py
Translated by AI from 简体中文Original (简体中文)
还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。
2 replies
Sort order