httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hane <>
Subject [users@httpd] Location of rewrite rules when using mod_proxy in 2.2
Date Wed, 27 Sep 2006 15:08:30 GMT
I am about to upgrade from 2.0 to 2.2.

Our current configuration is pretty simple.  We have a couple of virtual 
hosts and are using mod_jk to talk to 3 applications in Tomcat.  The 
mod_jk rules are not in a VirtualHost but are in the top level of the 
http.conf file.  This setup allows any domain to use the application. An 
example of the configuration is:

JkMount /backoffice-demo/faces* worker2
JkMount /backoffice-demo* worker1

Since we are moving to 2.2, we decide to move to mod_proxy_ajp. However, 
the rewrite rules seem to have to be in a VirtualHost block in order to 
work.  If we have them at the top level (not in a VirtualHost) block, 
they are never executed.  Is there a way to have a set of rewrite rules 
apply to ALL requests regardless of the requested host domain?

An example of the rewrite rule is (just in case it makes a difference):

RewriteCond %{REQUEST_URI} /backoffice-demo/faces(.*)
RewriteRule ^/(.*) ajp://localhost:9009/$1 [P]

RewriteCond %{REQUEST_URI} /backoffice-local(.*)
RewriteRule ^/(.*) ajp://localhost:8009/$1 [P]

These work great if there are not any VirtualHosts or if they are in a 
VirtualHost.  However, we want any domain that this server handles to be 
able to use these rewrites.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message