Mobile app version of vmapp.org
Login or Join
Eichhorn148

: SSL certificate for server with 2 static ips We have an apache server in our office premises which is used for some ssl related requests. The office premise has 2 internet connections with

@Eichhorn148

Posted in: #Apache #SecurityCertificate

We have an apache server in our office premises which is used for some ssl related requests. The office premise has 2 internet connections with static ip address. The internet connections are switched based on load and availability automatically by a hardware firewall and router.
The port forwarding is set correctly for the same.

The problem we are facing is that we need to change the SSL certificate on the server based on the ip address which is currently in use(which changes at average frequency of 1 day). Is there some automatic way in which we can use the correct SSL certificate depending on the ip address in use?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

Apache can be configured to serve different SSL for each of your IP addresses. To do so, you need to set up Virtual hosts for each IP address on port 433. For example:

Listen 2.2.2.2:443
Listen 3.3.3.3:443

<VirtualHost 2.2.2.2:443>
ServerName secure.com
DocumentRoot /home/foo/secure.com
SSLEngine on
SSLCertificateFile /home/foo/ssl/secure.com.crt
SSLCertificateKeyFile /home/foo/ssl/secure.com.key
SSLCACertificateFile /home/foo/ssl/ca.txt
</VirtualHost>

<VirtualHost 3.3.3.3:443>
ServerName secure.net
DocumentRoot /home/foo/secure.net
SSLEngine on
SSLCertificateFile /home/foo/ssl/secure.net.crt
SSLCertificateKeyFile /home/foo/ssl/secure.net.key
SSLCACertificateFile /home/foo/ssl/ca.txt
</VirtualHost>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme