Download an suPHP RPM package.
Find the correct package for the architecture that you're using. Example below is for 64-bit Intel install on CentOS/ Red Hat Enterprise 5:
rpm -i http://apt.sw.be/redhat/el5/en/x86_64/RPMS.rpmforge/mod_suphp-0.7.0-1.el5.rf.x86_64.rpm
Create or overwrite /etc/suphp.conf with the following. (The original package file can cause errors. Use of the following is recommended.)
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0077
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=true
;Send minor error messages to browser
errors_to_browser=true
[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
Edit /etc/httpd/conf.d/suphp.conf to only contain the following two lines:
LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine off
Add the following lines in your virtualhost configuration file.
suPHP_Engine on
suPHP_UserGroup vhost_owner vhost_group
suPHP_AddHandler x-httpd-php
AddHandler x-httpd-php .php .php3 .php4 .php5
Restart the web server:
service httpd restart
Related
Topics & Information |
|
None
at this time. |
|
|
|
|