tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: Configure multiple number of aliases / sub-domains
Date Thu, 22 Sep 2005 11:25:04 GMT
I don't think that Tomcat can do that without some hacking.

I think that you may be able to accomplish what you need by doing a little 
redirecting.

You might be able to use a filter to parse and redirect the request to the 
base domain.

Or use the default host as a catch all and the redirect the request to the 
desired domain.

I am sure there are some on the list that can help with the code as I have 
not messed with filters or redirects enough to give you any solid code. One 
source for the code is Tomcat itself, as it has to do this with the request 
in the first place. In your case you are just handling it a little 
differently.

And of course there is always the chance that I am FOS and someone will come 
up with a better solution.

Doug


----- Original Message ----- 
From: "Assaf" <assafn@yahoo.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, September 22, 2005 5:20 AM
Subject: Re: Configure multiple number of aliases / sub-domains


> Hi Tom,
>
> Thanks again for the answer. BUT my problem is not the
> hosts file. That works fine. My issue is as follows:
>
> I have multiple hosts (as in TOMCAT HOSTS) running on
> the server. Each is mapped to a different context/
> application. I need to be able to map ALL subdomains
> to the same application as the www. subdomain.
> Currently I have in the server.xml file:
>
> <host name="domain.com">
>   <alias>www.domain.com</alias>
>   <alias>xx1.domain.com</alias>
>   <alias>xx2.domain.com</alias>
> </host>
>
> It is not practical to have a list of all subdomains
> (which in this case are aliases) in the server.xml
> file as they are dynamically created and deleted.
>
> Looking forward,
>
> Assaf
>
> --- Tom Burke <tom.burke@expensys.com> wrote:
>
>> The Hosts file is hold-over from the pre-DNS method
>> of finding IP
>> addresses. Basically, there's a file - 'Hosts' -
>> that holds addresses,
>> in the format:
>>
>> domain_name    ip_address eg
>> myhost.co.uk    123.45.123.45
>>
>> At one time this was the only way that machines on
>> the Internet knew the
>> addresses of other machines, and a new Hosts file
>> would be circulated
>> (by email) to all the sysadmins who managed
>> connected hosts. (Google for
>> 'Jonathan Postel' if you want to know more about
>> these early days.)
>> Obviously, DNS has replaced all this, except that
>> Hosts remains - in a
>> Windows system you'll find it in:
>> [windir]\System32\Drivers\Etc
>>
>> In Linux/Unix I think it's still in /etc ; I
>> remember frantically
>> editing /etc/hosts on many systems in the past!
>>
>> So this is all a part of server-name resolution
>> within networking, not
>> Tomcat.
>>
>> Tom
>>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message