php proxy exists?

Wondering if anyone's heard of a php script that will 'forward' your requests on to, say, a mongrel instance, and return it? Kind of a php fcgi? Thoughts? Thanks. -Roger

Apache's mod_rewrite can get in front of a PHP script request and do pretty much anything with it.

Have a look at RewriteCond and RewriteRule.

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

Apache's mod_rewrite can get in front of a PHP script request and do pretty much anything with it.

Have a look at RewriteCond and RewriteRule.

I'm not sure if mod_rewrite can forward requests to a mongrel instance, tho. I don't think it quite can :slight_smile:

Why would you waste your time even thinking about PHP when the Apache httpd already has mod_proxy and mod_proxy_balancer to do exactly what you're describing?

mod_proxy and mod_proxy_balancer only have scope at the global and virtual host level, meaning that you can't use rails apps from a subdirectory using them (or perhaps it is indeed possible, and somebody out there can give me pointers on how?)

You should revisit the docs :slight_smile:

The first argument to ProxyPass is a path, e.g.

ProxyPass /example/ balancer://example_cluster/

HTH,