[FASTCGI] FastCGIExternalServer, path used actually has to exist

Alex Cartwright alexc223 at googlemail.com
Fri Sep 3 09:40:10 EDT 2010

Sorry, forgot to reply to all instead, here is the message again!

Ah ok, I've removed the Options line now, thanks for that.

Apache error log was showing me the following if the directory did not exist:

       File does not exist: /home/foobar/fcgi

and when the file did not exist:

       File does not exist: /home/foobar/fcgi/php53-fpm

However, I have got it working now with a different configuration, but
I still have some issues I'd like to discuss - here is my new config:

<VirtualHost *:80>
       ServerName foo.example.com

       SuexecUserGroup foobar foobar

       ErrorLog /var/log/apache2/vhosts/foo.example.com_error.log
       CustomLog /var/log/apache2/vhosts/foo.example.com_access.log combined
       DocumentRoot /home/foobar/domains/foo.example.com/public

       ## FastCGI + PHP-FPM
       AddHandler application/x-httpd-php .php
       Action application/x-httpd-php /fcgi-bin/php-fpm
       Alias /fcgi-bin/php-fpm /fcgi-extsrvs-phpfpm

       <Location /fcgi-bin/php-fpm>
               Order Deny,Allow
               Deny from all
               Allow from env=REDIRECT_STATUS

       FastCGIExternalServer /fcgi-extsrvs-phpfpm -socket
/var/opt/php53/run/www.sock -user foobar -group foobar

       <Directory /home/foobar/domains/foo.example.com/public>
               Options FollowSymLinks
               AllowOverride AuthConfig FileInfo Limit Options=Indexes

               Order Deny,Allow
               Allow from all

This works just fine, but if I change 'Alias /fcgi-bin/php-fpm
/fcgi-extsrvs-phpfpm' to 'Alias /fcgi-bin/php-fpm
/fcgi-extsrvs/phpfpm' and 'FastCGIExternalServer /fcgi-extsrvs-phpfpm
...' to 'FastCGIExternalServer /fcgi-extsrvs/phpfpm ....' (note the -
replace with a / in fcgi-extsrvs-phpfpm) then I get the following
Apache errors:

       File does not exist: /fcgi-extsrvs

Doing that simple change (replacing a - with /) results in a 404
error. Is a slash not allowed? That is something which has confused


On 3 September 2010 13:37, Rénald Casagraude <rcasagraude at interfaces.fr> wrote:
> Hi,
> On 3 sept. 2010, at 13:56, Alex Cartwright wrote:
> This is the configuration that I am currently using, which is to use
> Apache2 with mod_fastcgi and PHP 5.3.3 with FPM
> $ cat /etc/apache2/mods-available/fastcgi.conf
> /etc/apache2/sites-available/foo.example.com
> <IfModule mod_fastcgi.c>
>        FastCgiWrapper /usr/lib/apache2/suexec
>        ## PHP-FPM
>        AddHandler php53-fpm .php
>        Action php53-fpm /fcgi-bin/php53-fpm
>        <Location /fcgi-bin/php53-fpm>
>                Order Deny,Allow
>                Deny from all
>                Allow from env=REDIRECT_STATUS
>                Options ExecCGI
>        </Location>
> </IfModule>
> Remove the Options ExecCGI that does not make sense in external calls
> This works just fine, and I can run PHP scripts through php-fpm.
> However I have had to create the file "/home/foobar/fcgi/php53-fpm"
> which contains nothing.
> What happens if the file does not extsts ?
> Regards,
> Rénald

More information about the FastCGI-developers mailing list