Single SSL proxy to multiple SSL and non-SSL domain names

Single SSL proxy to multiple SSL and non-SSL domain names

Single SSL proxy to multiple SSL and non-SSL domain names 150 150 Roderick Derks

After some puzzeling I found the way to create a SSL web proxy that connects to SSL and non-SSL websites. This is an example of the VirtualHost configuration in the ssl.conf file.
Read more about creating ssl websites here.

NameVirtualHost *:443

<VirtualHost *:443>
    ServerName site_no_ssl.r71.nl
    SSLEngine On

    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

    ProxyPass / http://site_no_ssl.r71.nl/centreon/
    ProxyPassReverse / http://site_no_ssl.r71.nl/centreon/
</VirtualHost>

<VirtualHost *:443>
    ServerName other
_site_no_ssl.r71.nl
    SSLEngine On

    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

    ProxyPass / http://other_site_no_ssl.r71.nl/
    ProxyPassReverse / http://
other_site_no_ssl.r71.nl/
</VirtualHost>

<VirtualHost *:443>
    ServerName site_with_ssl.r71.nl

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

    SSLEngine on
    SSLProxyEngine On
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

    ProxyRequests On
    ProxyPreserveHost On
    ProxyPass / https://site_with_ssl.r71.nl:443/
    ProxyPassReverse / https://
site_with_ssl.r71.nl:443/
</VirtualHost>

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message