-
1. Re: mod_cluster interfering with other VirtualHost requests
jfclere May 28, 2010 2:36 AM (in response to martinuk)Try UseAlias 1 and use <Alias>VirtualHostName</Alias> in the jboss <Host/> configuration.
-
2. Re: mod_cluster interfering with other VirtualHost requests
martinuk May 28, 2010 1:21 PM (in response to jfclere)Thanks for the reply. Your suggested UseAlias approach works for the domains/virtualHosts that are on one or the other, but still see the same problem for hosts that are present on both apache and jboss but use different contextRoots.
For the example config i gave above, if i want apache/cgi scripts to handle requests to:
example.domain.com/
and
example.domain.com/exec
but I have a Host defined in jboss:
<Host name="example.domain.com">
<Alias>exampleAlias.domain.com</Alias>
</Host>with a contextRoot of "/admin" (<context-root> defined inside <jboss-web> in jboss-web.xml of .war)
then the jboss/mod_cluster requests are passed through to jboss ok (eg example.domain.com/admin requests are serviced) but the requests that should be handled by apache (eg example.domain.com/exec) are still lost.
(The Context /exec is not deployed on jboss and does not show up in mod_cluster_manager, although i do have a root context / deployed for a separate application with different alias)
Is there a way to get mod_cluster and apache to handle the respective requests to the different Contexts for the same alias/domain correctly?
-
3. Re: mod_cluster interfering with other VirtualHost requests
jfclere May 31, 2010 2:22 AM (in response to martinuk)If example.domain.com/ is routed to jboss it is because you haven't ROOT in the excludedContexts properties.
In case you need to have ROOT enabled you should use the NoProxy directive for the example.domain.com/exec something like:
ProxyPass /exec !
-
4. Re: mod_cluster interfering with other VirtualHost requests
jfclere May 31, 2010 2:36 AM (in response to martinuk)If example.domain.com/ is routed to jboss it is because you haven't ROOT in the excludedContexts properties.
In case you need to have ROOT enabled you should use the NoProxy directive for the example.domain.com/exec something like:
ProxyPass /exec !
-
5. Re: mod_cluster interfering with other VirtualHost requests
martinuk Jun 1, 2010 9:13 AM (in response to jfclere)Thanks again for the reply. My excludedContexts include ROOT, but out of the multiple applications I have deployed on jboss, one has a contextRoot of "/".
<property name="excludedContexts">${jboss.mod_cluster.excludedContexts:ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console}</property>
So, for the example config i quoted above:
I have an application deployed on jboss with domain/alias "another.domain.com" and context-root "/" - both alias and root context show up in mod_cluster_manager correctly. When this application is deployed it stops requests to "example.domain.com" and "example.domain.com/exec" being serviced (but requests to "example.domain.com/admin/" are now handled ok after UseAlias=1 change).
Maybe it is wrong for me to include ROOT in excludedContexts, but requests to different domains+contextRoots do not seem to be differentiated correctly:
another.domain.com/ (deployed on jboss with root context) --> requests handled ok
example.domain.com/admin/ (deployed on jboss with context-root "admin") --> requests handled ok
example.domain.com/ (apache only with root context) --> requests not serviced
Can mod_cluster differentiate a request to a root context between domainA and domainB?
-
6. Re: mod_cluster interfering with other VirtualHost requests
jfclere Jun 1, 2010 11:03 AM (in response to martinuk)As I said before you have to use ProxyPassMatch regexp ! in the VirtualHost where you want / handled by httpd.
-
7. Re: mod_cluster interfering with other VirtualHost requests
martinuk Jun 2, 2010 12:46 PM (in response to jfclere)All now working fine with combination of UseAlias, ProxyPass and ProxyMatch where needed.. Thanks!
-
8. Re: mod_cluster interfering with other VirtualHost requests
kwk_kwk Sep 6, 2010 9:08 AM (in response to martinuk)Hi Martin,
could you share working extracts from your config files (jboss-web.xml, server.xml, httpd.conf) for deployment a ear application to root context?
I can't figure out how to make an ear application to deploy to / (root) context.
-
9. Re: mod_cluster interfering with other VirtualHost requests
martinuk Sep 9, 2010 7:51 AM (in response to kwk_kwk)Hosts are defined as standard in the tomcat/jboss server.xml , for example:
<Host name="host1.example.com">
<Alias>host2.example.com</Alias>
...
</Host>jboss-web.xml needs no special mod_cluster config. Httpd config is same as i stated above in my first post to this thead, but with the following additions:
UseAlias 1
and depending on which requests you want mod_cluster to ignore and let apache handle instead, a combination of ProxyPass and/or ProxyPassMatch as needed.
eg to have apache handle every request for a VirtualHost:
ProxyPass / !
or use a regex to selectively bypass only certain requests:
ProxyPassMatch [regex] !