SuPHP On Fedora 7 Or CentOS 5 With ISPConfig

Want to support HowtoForge? Become a subscriber!
Submitted by o.meyer (Contact Author) (Forums) on Wed, 2007-08-22 09:53. :: CentOS | Fedora | ISPConfig | Control Panels

SuPHP On Fedora 7 Or CentOS 5 With ISPConfig

Version 1.0
Author: Oliver Meyer <o [dot] meyer [at] projektfarm [dot] de>
Last edited 08/14/2007

This document describes how to set up suPHP on Fedora 7 or CentOS 5 with ISPConfig. It rests upon parts of the howto How To Set Up suPHP On A Debian Etch Based ISPConfig Server from Hans.

The resulting system will support suPHP with ISPConfig.

This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.

 This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!


1 Setup Basic System

Set up a basic system as fundament.

If you want to use Fedora 7, follow the Howto The Perfect Server - Fedora 7 from Falko Timme.
Else, if you want to use CentOS 5, follow the Howto The Perfect Setup - CentOS 5.0 (32-bit) from Falko Timme.

After that set up ISPConfig.

Download it from A detailed documentation is available there of course.


2 Disable The PHP Module

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

Comment out "LoadModule php5_module modules/"


3 Install PHP As Cgi

yum install php-cli


4 Get And Customize SuPHP

cd /tmp
tar xvfz suphp-0.6.2.tar.gz
vi suphp-0.6.2/src/apache2/mod_suphp.c

Replace the lines 324/325 with these two lines below (if you use a different version of suPHP, the line numbers can be different):

AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp to handle these MIME-types"),

AP_INIT_ITERATE("suPHP_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp not to handle these MIME-types"),

Now we prepare and install suphp:

cd suphp-0.6.2/

./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=paranoid --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes


make install


5 Suphp Configuration

vi /etc/suphp.conf

Should look like this:

;Path to logfile
;User Apache is running as
;Path all scripts have to be in
;Path to chroot() to before executing script
;Security options
;Check wheter script is within DOCUMENT_ROOT
;Send minor error messages to browser
;PATH environment variable
;Umask to set, specify in octal notation
;Minimum UID
;Minimum GID

;Handler for php-scripts
;Handler for CGI-scripts


6 Apache Configuration

vi /etc/httpd/conf.d/suphp.conf

Insert the following line:

LoadModule suphp_module modules/


7 ISPConfig Configuration

vi /home/admispconfig/ispconfig/lib/


$go_info["server"]["apache2_php"] = 'both';


$go_info["server"]["apache2_php"] = 'suphp';

After that restart the Apache Webserver:

/etc/init.d/httpd restart

Now you have to modify a web in ISPConfig.
Ths will initiate ISPConfig to write a new vhost-file with suPHP-support.
After that ISPConfig should work fine with suphp.


8 Links

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Adam (not registered) on Wed, 2008-12-03 17:46.

Please note that you need the apr-devel package as well. It will save you lots of time trying to compile suphp.