Java Mailing List Archive

http://www.junlu.com/

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

From which apache virtual host did a request come from?

Mike Curwen

2003-08-12

Replies:


Basically, we have one apache instance going through the jk connector to
one tomcat instance. Plenty of virtual hosts.

1) Is it possible to mount several virtual hosts to the same web
application (the default one, as it happens)

2) Once the request is at that application, what's the best way to
determine from which virtual host it was sent?

One solution would be to chop of the URI part of the URL.
That would give me the http://www.foo.com:port/ part

Perhaps though, I could use a header. Like 'referrer'. But I am always
hearing about trouble with that particular header. Firewalls mess with
it, proxies mess with it, privacy advocates mess with it. Perhaps a
weird Apache/jk configuration messes with it.

What are the issues surrounding 2) ?

Thanks



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