Installing suPHP
1)
Download and extract the package : wget
http://www.suphp.org/download/suphp-0.6.1.tar.gz
2)
./configure --prefix=/usr/suphp1 --sysconfdir=/etc
--with-apache-user=apache --with-setid-mode=paranoid
--with-apxs=/usr/local/apache2/bin/apxs
--with-apr=/usr/local/apache2/bin/apr-1-config
3)
make
4)
make install
5)
cp /root/software/php/suphp-0.6.1/doc/suphp.conf-example
/usr/local/etc/suphp.conf
After that we
need to load the suPHP module in httpd.conf file. To do this, we
need to add the following lines :
LoadModule suphp_module
modules/mod_suphp.so
AddHandler x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php-source .phps
Once we
loaded the modules, we can create the virtual host entries.
Example
:
<VirtualHost
192.168.0.57>
ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /home/www
suPHP_Engine on
suPHP_UserGroup www www
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
<Directory
"/home/www">
Allow
from all
</Directory>
</VirtualHost>
No comments:
Post a Comment