At 10:23 06/08/01 -0400, you wrote:
>Hi Chris,
>
>I've looked at committing your patch.  However, in reviewing
>who uses Context.getHost(), I a little nervous about having
>Context.getHost() contain a wildcard.  (I think this is what
>your patch implies.)  Though I don't think anything bad
>happens currently, Context.getHost() is used in a number
>of locations which would seem as though they aren't expecting
>a wildcard.  ContextManager.createRequest() is the one that
>make me the most nervous.
>
>Context does have a vhostAliases field.  This would seem
>a more appropriate location for your wildcard string.
>Unfortunately, I don't think vhostAliases can be specified
>in server.xml or apps-xxx.xml yet.  You are welcome to look
>into adding that.  I'll try to find time if you can't.

I agree, that patch was really just a bit of a hack to get me out of a 
tight spot. I did see a few references to vhostAliases as I was looking 
through and thought that It would probably be the better place for this 
sort of thing.

I'll try to make some time this week to have a look at adding alias 
specifications to server.xml or apps-whatever.xml this week if you like...


>Once that is done, your patch and a simple update to
>SimpleMapper1.addContext() should get the behavior you desire
>without putting a wildcard in Context.getHost().

sounds good to me. I'll let you know how I get on....

Regards,

Chris



> > -----Original Message-----
> > From: Chris Bryden [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 31, 2001 10:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: SimpleMapper1.java
> >
> >
> >
> > Hi,
> >
> > I didn't get a response from the last mail I sent on this
> > subject, but I
> > hope I could borrow a few minutes of your time to at least
> > point me in the
> > direction of the relevant documentation on virtual hosts in tomcat...
> >
> > I am using
> >
> > Apache 1.3.20 and Tomcat 3.3 on Linux 2.4.5
> >
> > We use a large number of virtual hosts in apache of the form
> > xyz.subdomain.ourdomain.com. They all point to the same
> > context, with the
> > xyz art of the name being used by the webapp to determine how it was
> > accessed and set content accordingly...
> >
> > In the apache configuration, the virtual host is defined using the
> > ServerAlias  directive and a wildcard, however, tomcat seems
> > to need the
> > Host tags in server.xml to exactly match the host header..
> >
> > I was under a lot of pressure to get this working at the
> > time, so hacked
> > SimpleMapper1.java so that I could put a wildcard in my Host tag in
> > server.xml according to the attached patch...
> >
> > The question I have is, what is the future for defining
> > wildcard hosts in
> > the Host tags in server.xml..?  I would be more than happy to
> > help with any
> > development in this area, but I need to know what the plans
> > are for virtual
> > host definitions in server.xml
> >
> > If the reason that I didn't get a reply to my earlier mail is
> > that I am
> > being a complete muppet, please could you direct me to the
> > relevent docs so
> > I can demuppetize :-)
> >
> > Kind Regards,
> >
> > Chris
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >

Reply via email to