tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Kilbride <j...@kilbride.com>
Subject Re: Setting up Virtual Hosts
Date Thu, 01 Jan 1970 00:00:00 GMT
I'm not sure how Apache forwards the host info to Tomcat. If you're using an
IP Address in your VirtualHost directive in Apache, then Apache may be
sending the IPAddress to Tomcat as opposed to the hostname specified by the
ServerName attribute. So, if you're trying to catch host names in your
server.xml file, rather than IPAddresses, it may not work. However, this is
all speculation and I don't know if that's how it really works. It would
make sense, though.

The docBase is where Tomcat serves all your files from for that particular
webapp. Check out the "Developing applications with Tomcat" Howto in the
docs for an example of setting up source and deployment directories.

--jeff

> From: Glen Eustace <geustace@godzone.net.nz>
> Reply-To: tomcat-user@jakarta.apache.org
> Date: Mon, 21 May 2001 05:16:01 GMT
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Setting up Virtual Hosts
> 
>> I don't know if it makes a difference or not, but I've always had the
> same
>> host names in my Apache VHost config and my server.xml file. In your
> config,
>> you're using an IP Address in Apache and a name in server.xml. You might
> try
>> using the IP in server.xml instead.
> 
> All my vhosts use the same IP number as they are all named hosts.  Using
> the IP number in the VirtualHost header just saves a DNS lookup and make
> starting the server faster.  The host: header is matched against the
> ServerName attribute.
> 
>> Nothing else really jumps out at me. For an example of my config, search
> the
>> mail archive at:
> 
>> http://mikal.org/interests/java/tomcat/index.jsp
> 
>> Look for Virtual Host or my name.
> 
> Will do.  Thanks. This is very frustrating.
> 
> Another thought I had was whether the docBase directory must have some
> special format.  The webapps one in the tomcat directory has a bunch of
> .war files ( which I have no idea what they are for ).
> 
> Glen.
> 


Mime
View raw message