Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: apache + tomcat virtual hostnames

Dean A. Hoover

2004-02-02

Replies:

OK, I am answering my own question here...

The trick is to set:

UseCanonicalName on

in httpd.conf

Dean A. Hoover wrote:

> I am using apache 2 and tomcat 4.1 connected
> with mod_jk. I have multiple virtual named
> hosts in the httpd.conf file, such as:
>
> <VirtualHost *:80>
>  ServerName www.myserver.com
>  ServerAlias myserver.com
>  ...
>
> set up so that apache serves up the static
> content, and tomcat will handle the servlet
> stuff. In my server.xml file I set the attribute
> "name" to "www.myserver.com" in the Host tagset.
> This works fine if I hit http://www.myserver.com
> but not for http://myserver.com. Apache handles
> both the same, but not tomcat. Is there something
> like ServerAlias in tomcat?
>
> Dean
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.