In some cases we may be running more than one tomcat instance on the same server. Each tomcat instance can be running in different ports.Applications deployed in each tomcat can be accessed using IP and port. General structure of DNS mapping as below.
Now problem comes when we need to configure different DNS names for each tomcat instance running on the same machine. This requirement can be achieved through virtual IP configuration in the machine. We need to configure three virtual IP for the same physical machine and DNS names needs to be configured for those virtual IP's .
Now we configured DNS for each virtual IP and tomcat instance needs to run specific IP in order to work as expected . We need to change tomcat connector configurations as below.
Binding address in tomcat configuration says that this particular tomcat is running with this virtual IP. We can use port as 443 for all three instance since each server is binded with IP address,So the combination of IP and port should be unique.
Now problem comes when we need to configure different DNS names for each tomcat instance running on the same machine. This requirement can be achieved through virtual IP configuration in the machine. We need to configure three virtual IP for the same physical machine and DNS names needs to be configured for those virtual IP's .
Now we configured DNS for each virtual IP and tomcat instance needs to run specific IP in order to work as expected . We need to change tomcat connector configurations as below.
<Connector port="443" address="256.256.1.1" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" compression="on" />
Binding address in tomcat configuration says that this particular tomcat is running with this virtual IP. We can use port as 443 for all three instance since each server is binded with IP address,So the combination of IP and port should be unique.
0 Comments
Post a Comment