无法使用 PfSense、ACME、HAProxy 和 Apache 访问 sub.mydomain.fr

问题描述 投票:0回答:0

我的 PfSense 和 HAProxy 有一些问题:

我已经在 PfSense 上为我的子域生成了一个带有 ACME 的证书,但我只能从 Internet 从 WAN ip 而不是子域访问它:(

我在我的 pfsense 上创建了一个端口转发规则,从 4443 重定向到 443,443 端口已经被 HAProxy 上的负载平衡 Web 服务器使用。 Port Forward 4443 to 443 我的网络服务器在我的局域网上是 192.168.2.2。

这是我的 HAProxy 前端配置: enter image description here

后端: enter image description here 在我的后端: enter image description here

我的 WAN 中有一条规则: enter image description here

我已经手动激活 a2ensite 并在我的 apache 网络服务器上导入了 ACME 生成的证书和密钥,并使用以下命令编辑了 default-ssl.conf:

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
        ServerAdmin webmaster@localhost
        ServerName example.com
        DocumentRoot /var/www/html

        # Specify the SSL certificate and key
        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/example.com.crt
        SSLCertificateKeyFile /etc/apache2/ssl/example.com.key

        # Enable SSL/TLS protocols
        SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
        SSLCipherSuite HIGH:!aNULL:!MD5:!3DES:!CAMELLIA:!AES128

        # Enable HSTS header
        Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"

        # Other configuration directives...
    </VirtualHost>
</IfModule>

重新加载 apache 进程没问题,我想我误解了 HAProxy 的工作方式?我不应该手动将证书和密钥添加到 Web 服务器并且不编辑 default-ssl.conf 吗?它应该是 HAProxy 的工作?

就像我说的,owncloud.mydomain.fr:4443 不起作用但@WanIP:4443 起作用(证书上有警告,所以这就是为什么我想我没有以好的方式使用 haproxy)。

提前致谢,已经为我的英语困难感到抱歉:$

https apache2 haproxy pfsense acme
© www.soinside.com 2019 - 2024. All rights reserved.