You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Rooney <ya...@yahoo.com> on 2001/06/30 21:05:51 UTC

Virtual host documentation error? (looking for server.xml example)

I ran into this while attempting to setup Tomcat & Apache with name based
virtual hosting.  It appears that the documentation for doing this
(docs/jakarta-tomcat-3.2.2b3/tomcat-apache-howto.html#virtual_hosting) lists
the wrong configuration for server.xml?

It looks like the listing for server.xml is actually the listing for httpd.conf
(see below).
---------------------------------------------------------
Next, you need to configure Tomcat's server.xml file. 
[ snip! ]
# Minimalistic Virtual Host configuration
<VirtualHost 192.168.0.1>
ServerName host1
DocumentRoot /web/host1/html
ApJServMount /servlet /ROOT
<Directory "/web/host1/html/WEB-INF">
Options None
Deny from all
</Directory>
</VirtualHost>

<VirtualHost 192.168.0.1>
ServerName host2
DocumentRoot /web/host2/html
ApJServMount /servlet /ROOT
<Directory "/web/host2/html/WEB-INF">
Options None
Deny from all
</Directory>
</VirtualHost>
[ snip! ]
Option 2 - Same Tomcat for all Virtual Hosts (server.xml)
---------------------------------------------------------            

Following the commented example in the server.xml, shouldn't it be something
like this:
--------------------------------------------------------- 
<Host name="host1" >
	 <Context path="" docBase="webapps/examples" />
	 <Context path="/examples" docBase="webapps/ROOT" />
</Host>
--------------------------------------------------------- 

I'm taking a guess here with <Host name="host1" ... I'm not sure, but it sounds
right.

Does anyone have some insite on this?
Thanks.
Jim





=====
|
|
|
|
|
|
|[ad below]

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/