Wednesday, September 5, 2012

Configuring multiple domains or sub-domains in tomcat


We all know how to create multiple domains in Apache. By adding virtual host etries. But how to configure multiple domains in tomcat? We can do this by adding multiple Host tags in server.xml. Its very simple. See the example below. Edit server.xml under conf directory. Suppose you want to setup three domains, and Every domain points to same ip address in the server.