tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <>
Subject Re: Virtual domains with Tomcat
Date Mon, 23 Jun 2003 12:45:37 GMT

It is trivial in Tomcat as well.

For each Apache ServerName, you will need a corresponding Host entry in 
Tomcat's server.xml.  Make sure each virtual host in Tomcat's server.xml 
has its own appBase.

For the VirtualHost you posted:

<Host name="" appBase="/var/jakarta/totalflood">
   <Context path="" docBase="ROOT" />

...or something very similar.  Put your JSPs in 
/var/jakarta/totalflood/ROOT.  Make sure there is a directory called 
/var/jakarta/totalflood/ROOT/WEB-INF.  Delete your Directory entry that 
allows all, and instead add a Directory entry that restricts WEB-INF and 
META-INF.  This is all covered in the docs for Host and for Context.  An 
example of what configuration for Apache looks like, for a virtual host 
named "localhost", is here:


On Fri, 20 Jun 2003 18:21:20 -0700, Stephen Carville 
<> wrote:

> How can I get Tomcat to recognize virtual domains?  This is trivial with 
> Apache and I can get Apache to fetch the correct jsp but I cannot get 
> timcat to process it.  If I turn off tomcat, apache sends the jsp source. 
> If I turn tomcat on, I get the error 404 page
> workers.tomcat_home-/var/jakarta/tomcat
> workers.java_home=/usr/java/jdk
> ps=/
> # worker list
> worker.list=ajp13
> worker.ajp13.port=8009
> worker.ajp13.type=ajp13
> jk.conf: (Included by the httpd.conf file)
> LoadModule jk_module modules/
> JkWorkersFile   /etc/httpd/conf/
> JkLogFile       /var/log/httpd/mod_jk.log
> example <Virtual Host>
> <VirtualHost *>
> ServerName
> DocumentRoot    /var/jakarta/totalflood/ROOT
> <Directory /var/jakarta/totalflood/ROOT>
> order allow,deny
> allow from all
> </Directory>
> DirectoryIndex  HomePage.jsp
> ErrorLog        /var/log/httpd/totalflood-error.log
> JkMount         /*.jsp  ajp13
> </VirtualHost>

Using M2, Opera's revolutionary e-mail client:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message