You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by 29djeo <29...@michaelstarkie.com> on 2003/12/15 00:14:33 UTC
virtual hosts
I followed the directions for setting up tomcat for virutal hosts:
I added the following to server.xml
<Host name="domain1.com" debug="0" appBase="webapps" unpackWARs="true">
<Alias>www.domain1.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="domain1." suffix=".log" timestamp="true"/>
<Context path="" docBase="domain1 debug="0" reloadable="true"/>
<Context path="/test" docBase="domain1" debug="0" reloadable="true"/>
</Host>
I also removed the default Host name reference to "localhost".
When I go to http://www.domain1.com I see a blank page and not the deployed application domain1. There are also numerous references to "localhost" in server.xml do these need to be modified to support multiple domains?
Re: virtual hosts
Posted by Andoni <an...@indigo.ie>.
Hello,
Try this:
Back up server.xml,
Delete all sections that are commented out,
change all tags to be on a single line.
Indent the file properly.
Remove the examples context.
Then comment the file by looking through the Docs.
IMPORTANT: You need to have each host serving from a different directory on
your system. I would recommend having
<tomcat_home>/webapps/<domain1>/<path_or_war>
<tomcat_home>/webapps/<domain2>/<path_or_war>
Etc.
Do not leave any apps/paths/wars at a higher level than any others.
Regards,
Andoni.
----- Original Message -----
From: "29djeo" <29...@michaelstarkie.com>
To: <to...@jakarta.apache.org>
Sent: Sunday, December 14, 2003 11:14 PM
Subject: virtual hosts
> I followed the directions for setting up tomcat for virutal hosts:
>
> I added the following to server.xml
>
> <Host name="domain1.com" debug="0"
appBase="webapps" unpackWARs="true">
> <Alias>www.domain1.com</Alias>
> <Logger
className="org.apache.catalina.logger.FileLogger"
> directory="logs" prefix="domain1."
suffix=".log" timestamp="true"/>
> <Context path="" docBase="domain1
debug="0" reloadable="true"/>
> <Context path="/test" docBase="domain1"
debug="0" reloadable="true"/>
> </Host>
>
> I also removed the default Host name reference to "localhost".
>
> When I go to http://www.domain1.com I see a blank page and not the
deployed application domain1. There are also numerous references to
"localhost" in server.xml do these need to be modified to support
multiple domains?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org