I'm having a problem getting /server-status to work Apache 2.2.14 on Ubuntu Server 10.04.1.
The default symlinks for status.load and status.conf are present in /etc/apache2/mods-enabled. The status.conf does include the location /server-status and appropriate allow/deny directives.
However, the only vhost I have in sites-enabled looks like this. The idea is to proxy anything with a Tomcat URL to a cluster of tomcats, and anything else to an IIS box. However, this seems to result in requests to /server-status being sent to IIS. Copying the /server-status in explicitly to the Vhost configuration doesn't seem to help, no matter what order I use. Is it possible to include /server-status do this within a vhost configuration that has a "default" proxy rule?:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://tomcatCluster>
BalancerMember ajp://qa-app1:8009 route=1
BalancerMember ajp://qa-app2:8009 route=2
ProxySet stickysession=ROUTEID
</Proxy>
<ProxyMatch "^/(mytomcatappA|mytomcatappB)/(.*)" >
ProxyPassMatch balancer://tomcatCluster/$1/$2
</ProxyMatch>
#proxy anything that's not a tomcat URL to IIS on port 80
<Proxy />
ProxyPass http://qa-web1/
</Proxy>
You need to add an exclusion for proxy — your
ProxyPass
andProxyPassMatch
directives should look like:!
in place of the target URL means “exclude the specified path from proxying”. Directives should be ordered with the most specific URL first, because the first matching directive is used.And putting
ProxyPass
andProxyPassMatch
inside<Proxy>
and<ProxyMatch>
containers is not documented — not sure whether it should really work correctly; just place them inside<VirtualHost>
.Replace:
With: