How to Configure Subdomain in Tomcat

Nesting each web app as the root webapp within the in server.xml by giving path=""

<Host name="login.coloza.com" appBase="/var/lib/tomcat7/webapps/client" unpackWARs="true" autoDeploy="true">
  <Alias>login.coloza.com</Alias>
  <Alias>www.login.coloza.com</Alias>
  <Context path="" docBase="/var/lib/tomcat7/webapps/loginRedirect"/>
  <Context path="/client" docBase="/var/lib/tomcat7/webapps/client"/>
</Host>
<Host name="admin.coloza.com" appBase="/var/lib/tomcat7/webapps/admin" unpackWARs="true" autoDeploy="true">
  <Alias>admin.coloza.com</Alias>
  <Alias>www.admin.coloza.com</Alias>
  <Context path="" docBase="/var/lib/tomcat7/webapps/adminRedirect"/>
  <Context path="/admin" docBase="/var/lib/tomcat7/webapps/admin"/>
</Host>

Comments

Popular posts from this blog

Reduce TIME_WAIT Socket Connections