Apache rewrite

I want to proxy all requests to Mongreel except for a few ruby ​​apps that run fastcgi on apache.

So basically I have http://domain.com/ Mongreel app
http://domain.com/appa ruby app handled by apache
http://domain.com/app_testb ruby app handled by apache

My httpd.conf looks like this:

RewriteEngine On
RewriteCond $1 !^(appa|app_testb)
RewriteRule ^(.*)$ http://127.0.0.1:port/$1 [P]

      

But this fails. http://doamin.com works as expected with Mongreel but no other application is being handled by apache. Any idea what is wrong with my configuration?

UPDATE Or how to enable mod_proxy for everything except / appa / * and / app_testb / *?

0


source to share


2 answers


I seem to have found a way:



ProxyPass /appa !
ProxyPass /app_testb !
ProxyPass / http://127.0.0.1:port/
ProxyPassReverse / http://127.0.0.1:port/

      

0


source


The right way

RewriteEngine On
RewriteCond% {REQUEST_URI}! Appa
RewriteCond% {REQUEST_URI}! Appb
RewriteRule ^ (. *) $ Http://127.0.0.1:port/$1 [P]


RewriteConds does not see what matched the rule

+2


source







All Articles