Sign up Log in
n/chit-chat · 10d ago · Edited · 273 views
u/yonggaoyaDiamond3 YEARS
n/chit-chatu/yonggaoya 3 YEARS · 10d ago

Fixing BT Panel's inability to issue SSL certificates for sites with reverse proxy enabled when running Apache

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.

Translated by AI from 简体中文

2
2
Log into join the discussion.

2 replies

Sort order
  1. James 💯 Legend MANAGER 10d ago

    Just showing some support for the tech post.

    Translated by AI from 简体中文

    0
  2. LuFei Silver 10d ago

    Learned something, thanks for sharing.

    Translated by AI from 简体中文

    0