You can't do it that way. At least the testing. You either have to set up DNS to resolve both names back to the IP or put entries in your host file. When you do a request to the server the header holds the URL and when you use the localhost that is what is sent in the header. Tomcat then will use the first host since there is no match. And that is why www.mysite.com works. It is the first one listed.

Add the entries to your host file and try the actual URLs listed in the server.xml, then if all else is right, it will work.


Doug



----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, June 24, 2005 6:16 PM
Subject: Virtual hosts with standalone tomcat 5.5.9


All I need is different FQDNs (Fully qualified domain names)

Say:

www.mysite.com,

mail.external.mysite.com

I tried simply going like this

<Host name="www.mysite.com">
<Context path="" docBase="/var/www/server1" reloadable="true" debug="0" />
</Host>

<Host name="mail.external.mysite.com">
<Context path="" docBase="/var/www/server2" reloadable="true" debug="0" />
</Host>

and www.mysite.com works fine but mail.external.mysite.com doesn't.

In my trials, I am actually using http://localhost:8080/ and
http://host2.localhost:8080/ and I am just copying all the files from the
webapps folder.

I don't think that this should be causing any problems, though.

I have searched for it and you get a lot on links refering to previous
versions, etc.

Albretch


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to