httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hane <chrish...@gmail.com>
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:

#[jboss]
JkMount /backoffice-demo/faces* worker2
#[tomcat]
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):

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

#[tomcat]
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.

TIA,
Chris....


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message