How To Install suPHP On Various Linux Distributions For Use With ISPConfig (2.2.20 And Above)
|
Submitted by falko (Contact Author) (Forums) on Thu, 2008-02-14 17:22. :: CentOS | Debian | Fedora | ISPConfig | Linux | Mandriva | SuSE | Ubuntu | Apache | Control Panels | PHP
How To Install suPHP On Various Linux Distributions For Use With ISPConfig (2.2.20 And Above)Version 1.0 Starting with version 2.2.20, ISPConfig has improved support for suPHP. This article explains how to install suPHP on various distributions supported by ISPConfig. (If you have used suPHP with previous ISPConfig versions, your installation will still work.) I do not issue any guarantee that this will work for you!
1 Debian Etch / Ubuntu 7.10For Debian and Ubuntu, the package libapache2-mod-suphp exists, however the problem with this package is that it doesn't support the suPHP_UserGroup directive (which is used by ISPConfig) because it wasn't compiled using the --with-setid-mode=paranoid switch. Therefore we must build mod_suphp manually. First we disable the normal PHP5 module (as root): a2dismod php5 Then we install the prerequisites needed to build mod_suphp: apt-get install php5-cgi apache2-prefork-dev Now we can download and build suPHP as follows: cd /tmp Finally we add the suPHP module to our Apache configuration... vi /etc/apache2/httpd.conf
... and restart Apache: /etc/init.d/apache2 restart
2 Fedora 8 / CentOS 5.1On Fedora 8 and CentOS 5.1, we must build mod_suphp manually for the same reasons as for Debian and Ubuntu (suPHP_UserGroup). First we disable the normal PHP5 module: vi /etc/httpd/conf.d/php.conf Comment out the LoadModule line:
Then we install the prerequisites needed to build mod_suphp: yum install php-cli httpd-devel Now we can download and build suPHP as follows: cd /tmp Finally we add the suPHP module to our Apache configuration... vi /etc/httpd/conf.d/suphp.conf
... and restart Apache: /etc/init.d/httpd restart
3 Mandriva 2008.0On Mandriva 2008.0, we must build mod_suphp manually for the same reasons as for Debian and Ubuntu (suPHP_UserGroup). First we disable the normal PHP5 module: vi /etc/httpd/modules.d/70_mod_php.conf Comment out the LoadModule line:
Then we install the prerequisites needed to build mod_suphp: urpmi php-cgi apache-devel Now we can download and build suPHP as follows: cd /tmp Finally we add the suPHP module to our Apache configuration... vi /etc/httpd/modules.d/A36_mod_suphp.conf
... and restart Apache: /etc/init.d/httpd restart
4 OpenSUSE 10.3OpenSUSE 10.3 comes with a suPHP package that understands the suPHP_UserGroup directive, so we don't have to build it ourselves. First we disable the normal PHP5 module. Open /etc/sysconfig/apache2 and remove php5 from the APACHE_MODULES line (so that it looks similar to this line - your modules might differ, but php5 must not be listed anymore): vi /etc/sysconfig/apache2
Run SuSEconfig afterwards. Now we install suPHP as follows: yast -i suphp Next we add suphp to the APACHE_MODULES line in /etc/sysconfig/apache2, e.g. like this: vi /etc/sysconfig/apache2
OpenSUSE's suPHP packages comes with a suPHP configuration that enables suPHP globally. Therefore we must disable this configuration now so that we can enable or disable suPHP in ISPConfig on a per-website basis: vi /etc/apache2/conf.d/mod_suphp.conf In that file we comment out everything:
Finally we run: SuSEconfig
5 Configure ISPConfigFinally we must tell ISPConfig that it should write a suPHP configuration to the Apache vhosts instead of the usual PHP configuration. To do this, we open ISPConfig's configuration file /home/admispconfig/ispconfig/lib/config.inc.php and set $go_info["server"]["apache2_php"] to suphp: vi /home/admispconfig/ispconfig/lib/config.inc.php
Now whenever you enable PHP for a web site in ISPConfig, ISPConfig will write a suPHP configuration to that web site's vhost configuration.
6 Links
|



Recent comments
11 hours 25 min ago
12 hours 24 min ago
16 hours 11 min ago
17 hours 25 min ago
21 hours 2 min ago
1 day 4 hours ago
1 day 13 hours ago
1 day 14 hours ago
2 days 5 hours ago
2 days 8 hours ago