Page 1 of 1

Tomcat virtual hosting

Posted: 2008/11/10 21:27:55
by natediggs
Hi Everyone,

So I have a CentOS 5.2 web server running Apache. It hosts 5 different websites for different customers. One of my customers wants to run a tomcat context on this server. I'm having a hard time getting Tomcat serve any applications on the Virtual Host. Has anyone had any experience setting this up?



Re: Tomcat virtual hosting

Posted: 2008/11/14 14:11:50
by natediggs
Let me be more specific to see if it will entice someone to help.....

I have a CentOS 5.2 VM that I use to host websites for clients. I currently host 4 websites on it and it works great for everything. Recently a client wanted to use Tomcat to create some JSPs for database interaction. I installed Tomcat on the box as well as Java 5. Now I want Tomcat to serve the contexts to his Virtual Host. Tomcat works fine on the default (localhost) VH but doesn't seem to start on his virtual host.

If I go to localhost:8080 I get the Tomcat page. If I go to I get nothing. If I try to go to I get a 404 error even though the manager.xml file is in the correct directory for the virtual host.

Here is the "hosts" section from my server.xml file:

When I look in /var/log/tomcat5/catalina.out everything starts up fine. It definitely parses the part of the server.xml file that setups up the virtual host but then it doesn't autodeploy the war file that is in there.

Any help is greatly appreciated.


Re: Tomcat virtual hosting

Posted: 2008/11/20 01:35:35
by LessZoa
Please confirm that you have done the following:

1-You are deploying the application into TOMCAT_HOME/webapps
2-You have created the context necessary for the application which should be located in TOMCAT_HOME/conf/Catalina/

The manager is not installed with TC anymore, you have to DL the manager app separately. From what I gather, you have the server.xml configured accurately, but have not set up your contexts.

What version of TC are you using?