Tomcat virtual hosting

Support for webhosts that use CentOS
Post Reply
natediggs
Posts: 27
Joined: 2008/01/26 18:03:32

Tomcat virtual hosting

Post by natediggs » 2008/11/10 21:27:55

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?

Thanks!

Nate

natediggs
Posts: 27
Joined: 2008/01/26 18:03:32

Re: Tomcat virtual hosting

Post by natediggs » 2008/11/14 14:11:50

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 virtualhost.com:8080 I get nothing. If I try to go to virtualhost.com:8080/manager 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.

Nate

LessZoa
Posts: 4
Joined: 2008/11/19 06:34:50
Location: Hawaii - really

Re: Tomcat virtual hosting

Post by LessZoa » 2008/11/20 01:35:35

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/virtualhost.com/



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?

Post Reply

Return to “CentOS 5 - Webhosting Support”