配置Apache HTTP路由到https不同的服务器上

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

我需要一个路线“HTTP”上一个“serverA的”到HTTPS“serverB上”。该HTTPS是自签名的,所以我并不需要验证。我已经能够得到它与下面的配置在serverA nginx的工作;

    upstream site_ssl {
            server serverB_IP:7061;
    }

    server {
            listen 7061 ;
            proxy_http_version 1.1;


            location /Notification {
                    proxy_ssl_verify              off;
                    proxy_pass https://site_ssl;
            }
    }

我需要在Apache Web服务器重新创建此,我已经尝试了不同的建议,但我目前的版本看起来像下面;

<VirtualHost *:7061>
    ServerName serverA
    SSLProxyEngine On
    SSLProxyCheckPeerCN Off
    SSLProxyCheckPeerExpire Off
    ProxyRequests Off
    ProxyPass /Notification https://serverB:7061
    ProxyPassReverse /Notification  https://serverB:7061
</VirtualHost>

Apache的安装超时或“无法获取响应”响应。 nginx的设置是完美无瑕的。我需要Apache设置平移,使得它的工作原理就像nginx的

apache nginx reverse-proxy
1个回答
0
投票

当在nginx的配置来看,据我所知,serverB上为443 / TCP监听。所以我看到的会是:

<VirtualHost *:7061>
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

    ServerName serverA
    SSLProxyEngine On
    SSLProxyCheckPeerCN Off
    SSLProxyCheckPeerExpire Off
    ProxyRequests Off
    ProxyPass /Notification https://serverB
    ProxyPassReverse /Notification  https://serverB
</VirtualHost>

编辑:我认为你还需要以终止SSL连接的SSLEngine和SSLCertificate {文件,密钥文件}设置。

© www.soinside.com 2019 - 2024. All rights reserved.