【发布时间】:2021-05-06 04:51:03
【问题描述】:
我正在 Apache 2.4 上设置转发代理,我发现对 HTTPS url 的每个请求都会导致 400 响应。
apache错误日志显示:
[ssl:error] AH02032:通过 SNI 提供的主机名 my.example.net 和通过 HTTP 提供的主机名 stanford.edu 不同
我可能做错了什么?我的配置如下:
Listen 3443
<VirtualHost *:3443>
SSLEngine on
ProxyRequests on
ProxyVia off
<Proxy *>
Allow from all
</Proxy>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/my.example.net/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my.example.net/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/my.example.net/chain.pem
ErrorLog /var/log/httpd/myerr.log
</VirtualHost>
我已尝试添加以下所有内容,但没有效果:
-
SSLProxyEngine与on和off SSLProxyVerify noneAllowCONNECT 443
我通过运行测试代理:
https_proxy='https://my.example.net:3443/' curl 'https://stanford.edu/'
我的服务器 my.example.net 在 CentOS 7 上运行 Apache 2.4
【问题讨论】: