[FASTCGI] SetHandler and AddHandler ignored

Rob Saccoccio robs at fastcgi.com
Wed Oct 8 08:50:11 EDT 2008


> > To do what you want, the path in the FastCGIExternalServer directive
> should
> > not be a directory.  You want something like this (see
> > http://www.fastcgi.com/docs/faq.html#PHP and the PHP docs):
> >
> > <VirtualHost *:80>
> >         ServerName www.example.com
> >         DocumentRoot /home/user/webs/www.example.com
> >         Action php-fastcgi <php-path>
> >         AddHandler php-fastcgi .php
> > </VirtualHost>
> > FastCGIExternalServer <php-path> -host 127.0.0.1:9000
> >
> > Where <php-path> is someplace outside of your servers' document root or
> is
> > inside but is not a directory.
> 
> And this doesn't work.
> 
> Using:
>    Action php-fastcgi /fastcgi/www.example.com
>    AddHandler php-fastcgi .php
> </VirtualHost>
> FastCGIExternalServer /fastcgi/www.example.com -host 127.0.0.1:9000
> 
> Going to http://www.example.com/journal/ results in:
> 
> The requested URL /fastcgi/www.example.com/journal/index.php was not found
> on this server.

Did you try using a path that did exist?

Did you try using the virtual option to the Action directive?:

The optional virtual modifier turns off the check whether the requested file
really exists. This is useful, for example, if you want to use the Action
directive in virtual locations.

> Because modules shouldn't be setting the handler themselves? That's what
> SetHandler and AddHandler are for.
>
> I've spend a significant amount of time getting this to work, trying
> many, many permutations of configurations. The only way I've got
> FastCGIExternalServer to work is as I've explained.

It's perfectly fine for a module to set the handler and many modules do it,
including some inside the Apache distribution.

It's a shame that you've had to spend a significant amount of time trying to
get this to work, but that doesn't mean that your result is the only one or
the right one.

Rob






More information about the FastCGI-developers mailing list