Re: mod_fastcgi + apache + file on local filesystem

Robert Jordan <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <[email protected]>
Hey,

Andrzej Nakonieczny wrote:
> 	I have an apache (2.2.3) with mod_fastcgi (2.4.2) on frontend server
> and php on backend server. It works good but I'm wondering why apache
> needs to have php file on local filesystem. In mod_fastcgi's docs is
> wrote that "The filename does not have to exist in the local
> filesystem.". Is it true?

This is true, but the statement applies to /var/www/cgi-bin/php
only.

AddHandler expects that the file physically exists, so it cannot
be used.

I think you have to resort to URL rewriting, something like that
(untested, I'm not sure if it's correct):

--8<--
FastCGIExternalServer   /var/www/cgi-bin/php -host ip_backend:32001
-idle-timeout 240 -appConnTimeout 0

Action                  php-fastcgi             /cgi-bin/php

RewriteEngine on
RewriteCond %{REQUEST_FILENAME}	!-f
RewriteCond %{REQUEST_FILENAME}	!-d
RewriteRule ^(.*)	/cgi-bin/php/$1	[L]
--8<--

Robert

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.