502 proxy Error [error reading from remote server]

I get an error with my https site. when I work with my http site, it works great on APACHE2 on Ubuntu 14.04.

enter image description here

here is my virtual host configuration for https site

<VirtualHost _default_:443>



                         SSLProxyEngine On
                         ProxyRequests Off
                         ProxyPreserveHost On
                         RequestHeader set Front-End-Https "On"

                        servername jenkins.mydomain.com
          Proxypass / https://192.168.0.93:8080/  Keepalive=on
                        ProxypassReverse / https://jenkins.mydomain.com/


                        SSLEngine on
                        SSLCertificateFile      /etc/apache2/ssl/wildcard.crt

                        ErrorLog ${APACHE_LOG_DIR}/error.log
                        CustomLog ${APACHE_LOG_DIR}/access.log combined
</virtualHost>

please tell me where I am making a mistake.

+4
source share
1 answer

I solved my problem. I had a few errors in my virtual configurations. new virtualhost configurations with ssl below

    <VirtualHost *:443>
        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/wildcard.crt
        ServerAdmin ITSupport@Mydomain.com
        ProxyRequests Off
        ProxyPreserveHost On
        AllowEncodedSlashes NoDecode

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

        ServerName jenkins.mydomain.com
        ProxyPass / http://192.168.0.93:8080/ nocanon
        ProxyPassReverse / http://jenkins.mydomain.com/
        RequestHeader set X-Forwarded-Proto "https"
        RequestHeader set X-Forwarded-Port "443"

</virtualhost>
+4
source

Source: https://habr.com/ru/post/1653750/


All Articles