You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by cm...@acedsl.com on 2005/06/25 00:16:08 UTC

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Virtual hosts with standalone tomcat 5.5.9

Posted by Parsons Technical Services <pa...@earthlink.net>.
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: <cm...@acedsl.com>
To: <to...@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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Virtual hosts with standalone tomcat 5.5.9

Posted by Drew Jorgenson <de...@omniplatform.com>.
how do you have mail.external.mysite.com set up in your dns?? Does it
point to the same IP as your tomcat server that mysite.com is hosted on?

Drew.


On Fri, 2005-06-24 at 18:16 -0400, cmllpz@acedsl.com wrote:

> mail.external.mysite.com