fastcgi and php on Debian etch walkthrough

Debian 4.0 etch is the new stable distribution. Noteably, Debian has switched to version 2.2 of apache2. The following walkthrough shows how to setup php running inside the fastcgi apache2 module on this new Debian release.

Now patch ISPConfig to use php-fastcgi instead of the php module and create the starter in the right place. This patch also changes the default permissions of new web sites to 750 and adds www-data to every group created by ISPConfig.

Create the base directory for the php-fastcgi starter scripts. The idea is to have a separate one for each web site so that later on it is possible to chose the version and settings of PHP on a per site basis.

I will try to implement your patch in the ISPConfig dev branch as php configuration option.

Click to expand...

Hi Till, out of interest, what would the rough timescales of this be: 1week, 1month, 1year, ? ( *expecting* "when we're ready", but it doesn't hurt to ask )

I'm currently working on fastcgi packages ( php-binary & httpd_module ) for CentOS 4.4 (As I can't find any pre-build packages, you lucky debian people ! ), but I haven't yet figured how to config it properly, this could save me a whole load of hassle

would this be the solution to allow my users who use fastcgi to kill their own processes? sometimes I am required to killall -9 dispatch.fcgi because they make some bigger changes in their scripts...

also I'd like to ask a question about the settings of fastcgi:

I am trying to use these config options:

-maxClassProcesses n (10)
The maximum number of dynamic FastCGI application instances allowed to run for any one FastCGI application. It must be <= to -maxProcesses (this is not programmatically enforced).
-maxProcesses n (50)
The maximum total number of dynamic FastCGI application instances allowed to run at any one time. It must be >= to -maxClassProcesses (this is not programmatically enforced).

Click to expand...

The first option limits the number of children of a certain script (I guess determined by the name) the second one limits the total number of active children.
BUT if I set a limit for the first one, this does not work out for me as my different instances all have the same name: dispatch.fcgi so if I set option#1 to 2 because I want each "scritp" running max. 2 times in parallel I won't be able to have more than 2 dispatch.fcgi in total on my system...

I was myself trying to compile the patched suexec on a debian/etch and I encourted the same compilation errors reported above by mtuser. Actually, it is just enough to "./configure" before building suexec.

#/etc/init.d/apache2 restart
Forcing reload of web server (apache2)...Syntax error on line 21 of /etc/apache2/mods-enabled/fastcgi.conf:
Invalid command 'Action', perhaps misspelled or defined by a module not included in the server configuration
failed!

It allows for parsing .htaccess files with php settings into directories and parses them for php-cgi. The only thing that it's really missing for a complete replacement of all php module features is a place where to define settings a user cannot override. This one, though, prevents users from overwriting open_basedir and safe_mode stuff (if safe_mode is set).

...
Now patch ISPConfig to use php-fastcgi instead of the php module and create the starter in the right place. This patch also changes the default permissions of new web sites to 750 and adds www-data to every group created by ISPConfig.

Click to expand...

Why do you patch sussec, does'nt it work like for apache2 from its default?

Why do you adds www-data to every group created by ISPConfig?

I'm using apache2.0 together with php-fast-cgi and sussec on sarge3.1 but there was no need to cange something like you told. Is all this different with etch?

Would be cool to know against which version of /root/ispconfig/scripts/lib/config.lib.php this diff was taken like with diff -u or so (includes context)
From the date of your post I would think
ISPConfig-2.2.12 (2007-04-17 00:18)
which I'm going to try now...