tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kurt" <kbon...@ntsource.com>
Subject Re: Apache not sending the requested URL to Tomcat...
Date Wed, 28 Apr 2004 13:34:25 GMT
Mike,

Setting "UseCanonicalName" to "Off" in Apache fixed the problem. Thanks for
your help!

- Kurt

P.S. It also works with both of the 2 apache VHost configurations I listed
below


----- Original Message -----
From: "Kurt" <kbonnet@ntsource.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Friday, April 23, 2004 3:28 PM
Subject: Re: Apache not sending the requested URL to Tomcat...


> Thanks for the suggestions.
>
> I ended up following this document:
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html
>
> And everything is working just fine now.   request.getServerName() returns
> the aliased domains and the main domain as appropriate. I'm going to
compare
> the conf files on my local machine (where I got it to work) and the
> production server soon and post what the configuration difference was back
> to the user list.
>
> - Kurt
>
> ----- Original Message -----
> From: "Malathi Jivan" <mj_igx@hotmail.com>
> To: <tomcat-user@jakarta.apache.org>
> Cc: <gb_dev@gb-im.com>
> Sent: Friday, April 23, 2004 12:02 PM
> Subject: RE: Apache not sending the requested URL to Tomcat...
>
>
> > >
> > Could someone please send me steps on how to do this? Connecting apache
> and
> > tomcat using virutal host settings seems to be exactly what I need. I
> really
> > dont care about mutiple virtual hosts at this point so instructions for
> just
> > one are fine.
> >
> > Thanks for your help in advance,
> > Malathi
> >
> > >From: "Mike Curwen" <gb_dev@gb-im.com>
> > >Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > >To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
> > >Subject: RE: Apache not sending the requested URL to Tomcat...
> > >Date: Fri, 23 Apr 2004 11:53:46 -0500
> > >
> > >I've wondered about this as well, and perhaps this is what you need:?
> > >http://httpd.apache.org/docs/mod/core.html#usecanonicalname
> > >
> > >I have a production app that depends on the behaviour you want changed
> > >(my tomcat app depends on ServerName being passed for all requests
> > >through ServerAlias), but it seemed to me there must be a way to switch
> > >this in Apache.
> > >
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Kurt [mailto:kbonnet@ntsource.com]
> > > > Sent: Friday, April 23, 2004 11:01 AM
> > > > To: tomcat-user@jakarta.apache.org
> > > > Subject: Apache not sending the requested URL to Tomcat...
> > > >
> > > >
> > > > In Apache I have VHosting setup so that multiple domains all
> > > > share the same pub directory. In Tomcat I have VHosting setup
> > > > so that multiple domains all share a single web application INSTANCE
> > > >
> > > > When I have Apache pass requests to Tomcat, only the domain
> > > > specified in the "ServerName" attribute of the Apache VHost
> > > > config gets passed to Tomcat, even though I'm accessing the
> > > > site under one of the domains specified in a "ServerAlias"
attribute.
> > > >
> > > > i.e.  I type in  www.otherdomain.com/showServerName.jsp in my
> > > > browser and the value displayed is www.domain.com  NOT
> > > > www.otherdomain.com  How do I get it to display
> > > > www.otherdomain.com? I need to be able to tell which domain
> > > > the user has typed into their browser. I have tried
> > > > request.getRequestURL and this also returns www.domain.com.....
> > > >
> > > > I am grateful for any assistance.
> > > >
> > > >
> > > > Example Config......
> > > >
> > > > In Apache.....
> > > >
> > > > <VirtualHost 127.0.0.2>
> > > >     ServerName www.domain.com
> > > >     ServerAlias www.otherdomain.com
> > > >     ......
> > > > </VirtualHost>
> > > >
> > > > In Tomcat
> > > >
> > > > <Host name="www.domain.com" debug="0" appBase="/webs/MyWebApp"
> > > >         unpackWARs="true" autoDeploy="true" >
> > > >
> > > >     <Alias>www.otherdomain.com</Alias>
> > > >     <Alias>www.anotherdomain.com</Alias>
> > > >     .......
> > > > </Host>
> > > >
> > > >
> > > > My Environment
> > > > ----------------------------
> > > > Apache 2
> > > > Tomcat 4.1.24
> > > > RH Linux 7.x
> > > >
> > > >
> > > >
> > > > I have tried setting up multiple VHost entries in Apache, but
> > > > then I received an error that Tomcat couldn't find the
> > > > mapping to xxxx.do (I'm using Struts, but it didn't work for
> > > > JSPs either) for all domains EXCEPT the domain in the "name"
> > > > attribute of the "Host" tag in the Tomcat config file. It did
> > > > serve static files from within the pub directory just fine.
> > > > Maybe I wasn't doing things right when I tried this, but I
> > > > hope somebody can provide me with the right way to do this,
> > > > or an alternative that works.
> > > >
> > > > i.e.
> > > >
> > > > In Apache
> > > >
> > > > <VirtualHost 127.0.0.2>
> > > >     ServerName www.domain.com
> > > >      ......
> > > > </VirtualHost>
> > > >
> > > > <VirtualHost 127.0.0.2>
> > > >     ServerName www.otherdomain.com
> > > >     ......
> > > > </VirtualHost>
> > > >
> > > >
> > > > Again, I am grateful for any assistance.
> > > >
> > > > Kurt Bonnet
> > > > kbonnet@ntso.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
> > >
> >
> > _________________________________________________________________
> > FREE pop-up blocking with the new MSN Toolbar - get it now!
> > http://toolbar.msn.com/go/onm00200415ave/direct/01/
> >
> >
> > ---------------------------------------------------------------------
> > 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


---------------------------------------------------------------------
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