tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben short" <...@benshort.co.uk>
Subject Re: How to test a tomcat virtual host?
Date Thu, 21 Sep 2006 14:43:16 GMT
If you are using windows you could try added a line like the following
to the c:\WINDOWS\system32\drivers\etc\hosts file.

 127.0.0.1 www.virtualhost1.com

Then open www.virtualhost1.com in your web browser. the same  this
should be possible from linux but i dont have my linux hat on at the
moment.

Ben

On 9/21/06, Samsamoddin Rajaei <sam@rajaei.de> wrote:
> Hi everybody,
> (I am newbie in this list!)
>
> I am trying to test my virtual hosts and my tomcat configuration on my
> local pc (Windows XP). I am using tomcat 5.0.28 and have configured
> following virtual hosts in my server.xml:
>
>   <Service name="Test">
>     <Connector port="9080" />
>     <Connector port="9009" protocol="AJP/1.3" />
>
>     <Engine name="TestEngine" defaultHost="host1" debug="0">
>       <Host name="host1" debug="0" appBase="e:/tmp/hosts/host1">
>         <Context path="" reloadable="true" docBase="/web"/>
>       </Host>
>       <Host name="host2" debug="0" appBase="e:/tmp/hosts/host2">
>         <Context path="" reloadable="true" docBase="/web"/>
>       </Host>
>       <Host name="host3" debug="0" appBase="e:/tmp/hosts/host3">
>         <Context path="" reloadable="true" docBase="/web"/>
>       </Host>
>     </Engine>
>   </Service>
>
> When I start tomcat they are no exceptions and everything seems to be ok.
> When I call the page "http://127.0.0.1:9080/" I see the defaultHost
> (host1). My Question is: how can I test my other hosts (host2 and host3)
> without declaring them as defarultHost? "http://127.0.0.1:9080/host2"
> doesn't work!
>
> Thanks for any help,
> Sam
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message