You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tyler Bye <hv...@viperpit.com> on 2003/02/21 09:16:13 UTC

Map multiple hosts to servlet... but maintain FQDN!

Hi All,

Thanks in advance for any help with this possibly newbie question.

I currently have my DNS, Apache, and Tomcat setup such that 
*.domain.com  maps beautifully to my servlet.  www.domain.com, 
bob.domain.com, duncan.domain.com all map to the same servlet.

My Apache VHost has a servername of domain.com with a serveralias of 
*.domain.com.

Tomcat's server.xml has my <Host name="domain.com">

Like I mentioned, any subdomain I submit gets to the servlet... however 
when I call request.getServerName(); I'm always getting domain.com.

I would like to get the FQDN that the user typed in to their browser such 
that request.getServerName() returns sub.domain.com instead of just domain.com.

Is this possible?  I've tried several combinations of wildcard entries as 
well as <Alias>*.domain.com</Alias> but I think I'm barking up the wrong tree.

Can anyone shed some light on this subject for me?

Thanks again,
Tyler



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