debian suphp and limit procs

Hi

apt-get install libapache2-mod-suphp suphp-common apache2 apache2-mpm-worker php5-cgi
a2enmod suphp

(this is normaly done with the installation)

mkdir /var/www/web/
useradd web
chown -R web:web /var/www/web

now your php files were executed as uid web and gid web

and now we add these lines to your apache config
normally in

/etc/apache2/sites-enabled/web
RLimitCPU 20 50
RLimitMEM 128000000 256000000
RLimitNPROC  3 6

this is to limit php procs and apache procs by cpu and ram and [n]procs

don’t forget to

/etc/init.d/apache2 restart

Have Fun

The mind is its own place, and in itself
Can make a Heav’n of Hell, a Hell of Heav’n.
– John Milton