httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilesh Govindarajan <>
Subject Re: [users@httpd] Re: recommended setup apache/php
Date Tue, 27 Jul 2010 10:15:34 GMT
If I understood your question properly, you're asking that
/htdocs/a.php is one fastcgi app and /htdocs/b.php is another.
If you want it this way, then you will have to add the shebang (#!)
line to all of your scripts before <?php starts, which is not a viable
solution if you have many php scripts which directly interact with the

I don't use that method, see my config below. .php is processed
without any shebang stuff.

FcgidMaxProcesses 100
FcgidMaxProcessesPerClass 50
FcgidFixPathInfo 1
FcgidMaxRequestsPerProcess 100
FcgidOutputBufferSize 1048576
FcgidProcessLifeTime 60
FcgidMinProcessesPerClass 0
FcgidIOTimeout 120

ExpiresActive On
ExpiresDefault "access plus 1 month"

# This config below ensures that php is processed w/o presence of shebang line

DirectoryIndex index.html index.php
AddType text/html .php
AddHandler php-fastcgi .php
Action php-fastcgi /cgi-bin/php.fcgi

<FilesMatch "\.php$">
        Options +ExecCGI
        ExpiresActive Off

And the source code for /cgi-bin/php.fcgi:

export PHPRC=/usr/local/etc/php PHP_FCGI_CHILDREN=0
exec /usr/local/bin/php-cgi $@

Nilesh Govindarajan
VPS Hosting:

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