Apache proxypass https到https

Uni*_*Zhu 4 apache ssl https proxy

这是我厌倦了做的事情:

  1. browser -internet-> https(Apache proxypass)-intranet - >(Apache https)
  2. 两个Apaches都安装了ssl证书.(startssl wide card,not self-signed)

Apache错误日志:

[client 192.168.2.157] SSL Proxy requested for test.xxx.com:443 but not enabled [Hint: SSLProxyEngine]

[error] proxy: HTTPS: failed to enable ssl support for 192.168.2.157:443 (test.xxx.com)

然后我尝试使用apache(在互联网上)代理到https://google.com 并且错误日志是相同的.

但是,https到http工作.browser -internet-> https(Apache proxypass)-intranet - >(Apache http)

我的配置:

[client 192.168.2.157] SSL Proxy requested for test.xxx.com:443 but not enabled [Hint: SSLProxyEngine]

要么:

[error] proxy: HTTPS: failed to enable ssl support for 192.168.2.157:443 (test.xxx.com)

似乎apache不可能将https处理为https?如果apache不支持这个nginx怎么样?

谢谢.

Neo*_*hen 7

您应该设置"SSLProxyEngine On".以下是我的例子,可能会给你任何想法.

<VirtualHost *:443>
    SSLEngine On
    SSLProxyEngine On
    ServerName my.example.com:443
    SSLCertificateFile "${SRVROOT}/conf/ssl/example.pem"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/example.key"
    ErrorLog "|bin/rotatelogs.exe -l /var/logs/apache/example/error.%Y-%m-%d.log 86400"
    CustomLog "|bin/rotatelogs.exe -l /var/logs/apache/example/ssl_request.%Y-%m-%d.log 86400" \
        "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

    ProxyRequests Off
    ProxyPass / https://www.google.com/
    <Location />
        ProxyPassReverse /

        Options FollowSymLinks
        Require all granted
    </Location>   
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)