tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <carn...@electrichendrix.com>
Subject Re: Serve same content to multiple URL's
Date Thu, 04 Apr 2013 20:21:41 GMT
On Apr 4, 2013, at 2:38 PM, "Christopher Schultz" <chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Chris,
> 
> On 4/4/13 12:28 PM, Chris Arnold wrote:
>> 
>> I have tried to add a second worker (worker2) in workers.properties
>> and added a virtualhost like: Here is the configured virtualhost
>> for domain2: 2nd virtualhost: JkMount /share|/* worker2 
>> RedirectMatch ^/$ http://share.domain2.com/share/
> 
> If you want the content to be identical, why do you need a second worker?

I didn't think I needed a second worker but because the working config only worked for http://share.domain1.com
and nothing else, I wanted to verify it should work or I needed another worker and you verified
I do not need another worker and in fact, the existing config for http://share.domain1.com
should work for http://share.domain2.com
> 
> Why do you need a second VirtualHost, even?

Apache has to answer for that request (http://share.domain2.com) and pass it to tomcat
> 
>> When i type http://share.domain2.com i arrive at 1 of our websites
>> but not the tomcat content. When i type 
>> http://share.domain2.com/share i get a 404 error. Do i need to
>> define another worker to accomplish this or should the defined
>> worker work for any domain given there is a virtualhost defined?
> 
> Workers don't care about VirtualHosts: the client's request headers
> will be sent to Tomcat and another round of virtual host resolution
> will occur over there. Having separate workers does not help anything.
> 
> I'm not sure why you are getting 404s: any idea if it's a response
> coming from httpd or Tomcat?

No error logs in apache or tomcat which is weird?

> If you browse to
> http://share.domain2.com/ are you properly redirected (as I would
> expect given the above configuration) to http://share.domain2.com/share ?

It doesn't appear so as a apache site answers the request. 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message