You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thanh Duong <du...@web.de> on 2002/02/04 19:54:39 UTC
How to setup multi-virtual hosts on tomcat 4.0 and apache 1.3
Hi,
I am trying to setup multi virtual hosts on tomcat 4.0 and apache 1.3. I
don't know what I did wrong, but it doesn't work.
When I try to call "http;//example1.de/index.jsp", it said
"The requested resource (/index.jsp) is not available."
Does someone know how to setup virtual hosts correctly?
Thanks
Thanh
I did the following:
in httpd.conf:
NameVirtualHost 1.2.1.211
<VirtualHost 1.2.1.211>
DocumentRoot /example1.de
ServerName example1.de
ServerPath /example1.de/
ErrorLog logs/example1-error_log
CustomLog logs/example1-access_log common
</VirtualHost>
<VirtualHost 1.2.1.211>
DocumentRoot /example2.de
ServerName example2.de
ServerPath /example2.de/
ErrorLog logs/example2.at-error_log
CustomLog logs/example2.at-access_log common
</VirtualHost>
in server.xml:
<Engine name="Standalone" defaultHost="localhost" debug="0">
....
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
<Context path="/manager" docBase="manager"
debug="0" privileged="true"/>
<Context path="/iw-mount/default/main/Development/WORKAREA"
docBase="/.iwmnt/default/main/Development/WORKAREA"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
...
</Host>
<Host name="example1.de" appBase="/example1.de" debug="0">
<Context path="/static_js"
docBase="/example1.de/static_js"
crossContext="false"
debug="0"
override="true"
reloadable="true" >
</Context>
<Context path=""
docBase="/example1.de"
crossContext="false"
debug="0"
override="true"
reloadable="true" >
</Context>
</Host>
<Host name="example2.de" appBase="/example1.de" debug="0">
<Context path="/static_js"
docBase="/example2.de/static_js"
crossContext="false"
debug="0"
override="true"
reloadable="true" >
</Context>
<Context path=""
docBase="/example2.de"
crossContext="false"
debug="0"
override="true"
reloadable="true" >
</Context>
</Host>
</Engine>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>