suPHP is a tool for executing PHP scripts with the permissions of their owners. There are some significant improvments in suPHP
If you have already successfully installed Apache, PHP and Mysql, on the server then follow the below steps.
Install and Configure mod_suphp.
1. Add the RepoForge repo
Fort 32-bit:
For 64-bit:
2. Now Install the following packages.
After install package make sure /etc/suphp.conf must have the below contents
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
;min_uid=500
;min_gid=500
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false
;full_php_process_display=true
;Send minor error messages to browser
errors_to_browser=false
[handlers]
;Handler for php-scripts
;x-httpd-php=”php:/usr/bin/php”
x-httpd-php=”php:/usr/bin/php-cgi”
application/x-httpd-php=”php:/usr/bin/php”
application/x-httpd-php4=”php:/usr/php4/bin/php”
application/x-httpd-php5=”php:/usr/bin/php”
;Handler for CGI-scripts
;x-suphp-cgi=”execute:!self”
Then open /etc/httpd/conf.d/suphp.conf and uncomment the below lines.
suPHP_Engine on
AddHandler x-httpd-php .php .php4 .php3 .php5 .phtml
suPHP_ConfigPath /etc
suPHP_UserGroup apache apache
For each VirtualHost you have to append the following lines, replacing username and group respectively
suPHP_UserGroup username group
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
And now restart the apache server.
That’s it.
