views:

78

answers:

2

I want to proxy all requests to Mongreel except for a few ruby apps that are running with 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 it fails. http://doamin.com works as expected proxyed to Mongreel but the other 2 app are not handled by apache. Any ideea what's wrong with my config?

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

+2  A: 

The correct way is

RewriteEngine On
RewriteCond %{REQUEST_URI} !appa
RewriteCond %{REQUEST_URI} !appb
RewriteRule ^(.*)$ http://127.0.0.1:port/$1 [P]

RewriteConds do not see what's been matched in the rule

Vinko Vrsalovic
http://domain.com/appa It's still handled by mongreel
daniels
Try this instead
Vinko Vrsalovic
A: 

It seems i have found a way:

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