Ssl – 502 proxy error apache reverse proxy

apache-2.2apache-2.4PROXYreverse-proxyssl

Below is my virtual host conf for https proxy

<VirtualHost *:443>
    ServerAdmin kirthan@openjuice.in
    ServerName example.openjuice.co

    ProxyRequests off
    SSLEngine on
    SSLProxyEngine On
    SSLCertificateFile /etc/ssl/cert/certs/apache.crt
    SSLCertificateKeyFile /etc/ssl/cert/certs/apache.key

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    <Location />
        ProxyPass https://localhost:3006/
        ProxyPassReverse https://example.openjuice.co:3006/
    </Location>

</VirtualHost>

But i am getting below error

Proxy Error

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request GET /.

Reason: Error reading from remote server

Please help me on this

Best Answer

It worked for me Add below to above conf

SSLProxyEngine on
SSLProxyVerify none 
SSLProxyCheckPeerCN off    
SSLProxyCheckPeerName off    
SSLProxyCheckPeerExpire off