Configure Virtual ips in /etc/rc.d/rc.local

When working with multiple secure domains on a single server you will need multiple virtual ip’s. For unsecure web address you can use virtual hosting using a domain name but secure address require that the packet be decrypted so the ip address is the method to split the virtual domains.

# Virtual Network Connections
# <mydomain1>
ifconfig eth0:2 172.16.2.115 netmask 255.255.255.0 up
route add -host 172.16.2.115 dev eth0:2
# <mydomain2>
ifconfig eth0:10 172.16.2.195 netmask 255.255.255.0 up
route add -host 172.16.2.195 dev eth0:10
# <mydomain3>
ifconfig eth0:21 172.16.2.97 netmask 255.255.255.0 up
route add -host 172.16.2.97 dev eth0:21

 

Run the same commands in a ssh terminal to make changes take effect immediately.

Run the below commmand to check that all virtual ips are set up correctly.

ifconfig