502 proxy error apache reverse proxy

11,426

It worked for me Add below to above conf

SSLProxyEngine on
SSLProxyVerify none 
SSLProxyCheckPeerCN off    
SSLProxyCheckPeerName off    
SSLProxyCheckPeerExpire off
Share:
11,426

Related videos on Youtube

kirthan shetty
Author by

kirthan shetty

Updated on September 18, 2022

Comments

  • kirthan shetty
    kirthan shetty over 1 year

    Below is my virtual host conf for https proxy

    <VirtualHost *:443>
        ServerAdmin [email protected]
        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

    • Froggiz
      Froggiz over 8 years
      Do you have any Apache log ? Did you tired : ProxyPass https://localhost:3006/ Keepalive=On ?
    • kirthan shetty
      kirthan shetty over 8 years
      Hi It got worked by adding below line to above conf SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off
  • Froggiz
    Froggiz over 8 years
    could you set your answer as valid (the check button under the vote button) ? thanks
  • Keerthana Prabhakaran
    Keerthana Prabhakaran over 6 years
    This works! @kirthan shetty, please accept the answer.
  • orev
    orev over 5 years
    Please note that disabling the SSLProxyCheck* bypasses many security benefits of SSL/TLS. You may need to use it in some situations, but you should be aware of the security risks and don't just use this blindly to fix the error without knowing what they do.