Need some help understanding how to setup FastCGI
steve <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm trying to setup FastCGI to run PHP files from Apache2, and
I have it working but not quite right.
Here are some details:
1. I'd like to have about 80 PHP processes available to run the PHP
stuff. I would like to know how to do this both by setting a fixed
pool of 80 processes or having a dynamic set between 20 and 80.
2. All PHP processes are for the same website, I have no need for
suexec, and don't use FastCgiWrapper. Right now everything is on the
same webserver, so I was going to use UNIX domain sockets rather than
TCP.
3. I use an opcode cache for PHP so PHP ideally would only see one
master process so it only creates a single shared memory segment for
the compiled code.
4. I don't want a user accessible fastcgi-bin URL!
This is what I have in http.conf
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
SetEnv PHP_FCGI_CHILDREN 80
SetEnv PHP_FCGI_MAX_REQUESTS 500
FastCgiIpcDir /usr/local/apache2/pipes
FastCgiServer
AddHandler fastcgi-script .fcgi
<Directory /fastcgi-bin/>
Order allow,deny
Allow from all
Options ExecCGI
SetHandler fastcgi-script
</Directory>
Alias /fastcgi-bin/ /usr/local/apache2/fastcgi-bin/
Action application/x-httpd-php4 /fastcgi-bin/php4.fcgi
Action application/x-httpd-php5 /fastcgi-bin/php5.fcgi
AddType application/x-httpd-php5 .php5
AddType application/x-httpd-php4 .php .php3 .php4
</IfModule>
It seems to create a dynamic pool of 1-10 PHP processes, though.
I get confused with how to handle Apache2's multi process-thread
configuration with FastCGI's multiple processes and PHP's
PHP_FCGI_CHILDREN and have the op-code compiler know that they are all
one thing...
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/