httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Engelhardt <>
Subject Re: [users@httpd] proxy_fcgi and PHP-FPM: error pages and config syntax
Date Wed, 22 Feb 2012 16:48:41 GMT

On Wednesday 2012-02-22 17:38, Jan Engelhardt wrote:
>>> RewriteEngine On
>>> RewriteRule \.php$
>>> proxy:fcgi://localhost:8002/%{DOCUMENT_ROOT}/%{SCRIPT_FILENAME}
>>> I share the dismay you might be expressing at seeing that. Is there a
>>> nicer way to configure accessing FPM through FastCGI?
>> No, what I've been using is very similar:
>> RewriteRule ^/?(.*\.php)$ fcgi://$1 [P,L]
>Could $1 possibly contain ../../secret.php, or does Apache
>already filter such hacks appropriately?

NB: When using fcgi://etc. or proxy:fcgi://etc. as substitution URL
together with [P], the debug log of an apache 2.2 (with
mod_proxy_fcgi backported) shows that the construction is flawed.
Maybe this has been corrected by the 2.3/2.4 series?

[Wed Feb 22 17:43:29 2012] [debug] proxy_util.c(1525): [client ::1] proxy: *:
found reverse proxy worker for

Some code probably needed to be taught to look for the "fcgi:" prefix
specifically, but in any case, using "proxy:" instead of [P] does the
same job :)

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