View Single Post
  #1  
Old 22nd June 2012, 13:24
botnet botnet is offline
Junior Member
 
Join Date: Jun 2012
Location: India
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to install suphp on centos 6.2 VPS ?

I did like this :

Code:
wget http://www.suphp.org/download/suphp-0.7.1.tar.gz ; tar -zxf suphp-0.7.1.tar.gz
cd suphp-0.7.1

yum install gcc gcc-c++ httpd-devel
yum install make

./configure --with-apr=/usr/bin/apr-1-config --with-apache-user=apache --prefix=/usr
make
make install
vi /etc/httpd/conf/httpd.conf

Add below line,
Code:
LoadModule suphp_module modules/mod_suphp.so
And in the <Directory /> section
Code:
suPHP_Engine on
suPHP_AddHandler application/x-httpd-php .php
suPHP_UserGroup webroot webroot
Do I need to change webroot to something ?

vi /etc/httpd/conf.d/php.conf

Add below line,
Code:
AddType application/x-httpd-php .php
vi /usr/etc/suphp.conf

Add below lines,
Code:
[global]
logfile=/var/log/httpd/suphp.log

loglevel=info
webserver_user=apache
docroot=/var/www

allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

check_vhost_docroot=false
errors_to_browser=false
env_path=/bin:/usr/bin
umask=0077
min_uid=100
min_gid=100

[handlers]
x-httpd-php="php:/usr/bin/php"
application/x-httpd-php="php:/usr/bin/php-cgi"

x-suphp-cgi="execute:!self"
After restarting apache, I got Server API sowing Apache 2.0 Handler.
Please help, What to do ?
__________________
Newbie to Linux and Newbie to VPS
Reply With Quote
Sponsored Links