0

Apache proxy with one physical IP = 10.2.2.1 and a logical IP = 10.2.2.2

Configuration is similar to below

<VirtualHost *:80>
   ServerName example.com
   <Location />
           ProxyPass http://server:8080/
           ProxyPassReverse http://server:8080/
   </Location>
</VirtualHost>

<VirtualHost *:80>
   ServerName example2.com
   <Location />
           ProxyPass http://server:8081/
           ProxyPassReverse http://server:8081/
   </Location>
</VirtualHost>

<VirtualHost 10.2.2.2:443>
ServerName example3.com
SSLEngine on
SSLCertificateFile /example3.com.cer
SSLCertificateKeyFile /example3.com.key
SSLCertificateChainFile /example3chain.com.cer                                              
Redirect / https://example3.com
<Location />
        ProxyPass http://server:8082/
        ProxyPassReverse http://server:8082/
    </Location> 
</VirtualHost>

<VirtualHost 10.2.2.1:443>
ServerName example4.com
SSLEngine on
SSLCertificateFile /example4.com.cer
SSLCertificateKeyFile /example4.com.key
SSLCertificateChainFile /example4chain.com.cer                                              
Redirect / https://example4.com
<Location />
        ProxyPass http://server:8083/
        ProxyPassReverse http://server:8083/
    </Location> 
</VirtualHost>

<VirtualHost *:80>
    ServerName example4.com
    Redirect / https://example4.com
</VirtualHost>

What is happening is the URL https://external4.com site is not hitting the correct virtual host it is going to the non-SSL redirect and just staying there and serving an SSL error page. I have been assured the DNS and firewalls are correct.

Is there a restriction when using mixed IP and Name based vhosts that the SSL sites have to be on separate IP's from each other and the non-SSL sites? Need some help here.

Gareth
  • 145

1 Answers1

1

The Redirect / https://example4.com in the SSL VirtualHost for example4.com seems like a loop to me...

HBruijn
  • 84,206
  • 24
  • 145
  • 224