Name: suPHP & Plesk 7.5.1 How-To
Written By: Anthony Gruetzmacher
Written On: 09/01/2005
Website: www.helixdevelopment.com
# Get suPHP #
1) wget http://www.suphp.org/download/suphp-0.5.2.tar.gz
# Untar suPHP #
2) tar-zxvf suphp-0.5.2.tar.gz
# Move to the suPHP directory #
3) cd suphp-0.5.2
# Configure suPHP to work with psa 7.5.1 #
4) use the following config like --with-prefix/usr --with-apxs=/usr/sbin/apxs --with-min-uid=0 --with-min-gid=0 --with-
apache-usr=apache --with-php=/usr/bin/php --with-logfile=/var/log/httpd/suphp_log --with-setid-mode=owner
# Compile suPHP #
5) make
# Install suPHP #
6) make install
# Turn on suPHP #
7) vi /etc/httpd/conf/httpd.conf
# add the following lines to the module load section #
LoadModule mod_suphp modules/mod_suphp
suPHP_Engine On
# Delete where suPHP automaticly adds suPHP to the httpd.conf #
# Save the httpd.conf and restart to see the changes #
9) save file
# Move to another apache config directory #
10) cd /etc/httpd/conf.d/
# Add a file of suPHP excluded sites #
11) vi suphp_exclude.conf
# This must here for webmail to function properly #
66.98.220.126:80
66.98.220.85:80
>
DocumentRoot /home/httpd/vhosts/webmail
ServerName webmail
ServerAlias webmail.*
UseCanonicalName Off
suPHP_Engine off
php_admin_flag engine on
php_admin_flag magic_quotes_gpc off
php_admin_flag safe_mode off
php_admin_value open_basedir "/home/httpd/vhosts/webmail:/etc/psa:/tmp"
php_admin_value include_path
"/home/httpd/vhosts/webmail/horde/lib:/home/httpd/vhosts/webmail/horde/pear:."
# This is only needed if you have sitebuilder installed #
ServerAdmin sb_team@sw-soft.com
DocumentRoot /usr/local/sitebuilder
ServerName sitebuilder.*
ServerAlias sitebuilder.*
ErrorLog logs/sitebuilder-error_log
CustomLog logs/sitebuilder-access_log common
DirectoryIndex /wizard/index.php
AddDefaultCharset UTF-8
suPHP_Engine off
# Save file #
12 ) Save file and restart apache /sbin/service httpd restart
# Enjoy a more secure server #
12) enjoy all php files should now run under the owner of the script and be logged to suphp_log in /var/log/httpd