Created
June 24, 2013 14:21
-
-
Save Karm/5850401 to your computer and use it in GitHub Desktop.
mod_cluster and ProxyPass, /static from httpd instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mod_proxy_balancer should be disabled when mod_cluster is used | |
LoadModule proxy_cluster_module modules/mod_proxy_cluster.so | |
LoadModule slotmem_module modules/mod_slotmem.so | |
LoadModule manager_module modules/mod_manager.so | |
LoadModule advertise_module modules/mod_advertise.so | |
# Set to some _local_ place (absolute path), definitely not an NFS... | |
MemManagerFile /home/mbabacek/EAP6/cache/mod_cluster | |
ServerName 127.0.0.1:8888 | |
ManagerBalancerName mycluster | |
<IfModule manager_module> | |
Listen 127.0.0.1:8888 | |
<VirtualHost 127.0.0.1:8888> | |
# See http://docs.jboss.org/mod_cluster/1.2.0/html_single/#d0e485 | |
CreateBalancers 1 | |
ProxyPassMatch ^/static/ ! | |
# balancer must match the ManagerBalancerName | |
ProxyPass / balancer://mycluster stickysession=JSESSIONID|jsessionid nofailover=on | |
ProxyPassReverse / balancer://mycluster | |
ProxyPreserveHost on | |
# One can play with ProxyPassReverseCookieDomain and ProxyPassReverseCookiePath in order | |
# to control behavior in cases like /mydyncontext/staticpath | |
<Directory /> | |
Order deny,allow | |
Deny from all | |
# Maybe not a very good idea for production :-) | |
Allow from all | |
</Directory> | |
# We want balancer advertising so as workers can join | |
# without prior proxy-list configuration. | |
ServerAdvertise on | |
# This is the only VirtualHost that will accept messages from workers. | |
EnableMCPMReceive | |
# Where is the mod_cluster manager console? | |
# One can tweak what's displayed there: docs.jboss.org/mod_cluster/1.2.0/html_single/#d0e631 | |
<Location /mod_cluster_manager> | |
SetHandler mod_cluster-manager | |
Order deny,allow | |
Deny from all | |
# Lat's change it prior going to production. | |
Allow from all | |
</Location> | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment