Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Tomcat 4 - 1 IP

Utilizing 1 IP for multiple site in Tomcat 4



10:47 pm on Mar 20, 2002 (gmt 0)

10+ Year Member

I am new to Tomcat but have worked with IIS for several years. In IIS I use host headers to have multiple sites on one IP address. Is there a way to accomplish this in Apache Tomcat 4?


1:40 pm on Mar 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Welcome to wmw

I'm not sure if this still applies to Tomcat 4 (probably does) but in v3 you could use virtual hosts in the same way as regular Apache, by putting something similar to this in your httpd.conf file:


DocumentRoot /home/www/whatever
ServerName www.example.com

That would set Apache to serve up files from /home/www/whatever in response to requests to www.example/com on IP

You could then put the extra Tomcat configuration directives (eg ApJServMount) within <virtualhost></virtualhost> to enable jsp on that site.