Install and Configure mod_suphp or suphp on Plesk Server

Plesk control panel comes with Media Temple DV package doesn’t support suphp/mod_suphp. I like suphp, it gives you the user/group permission as the control panel created for you, so that you will have the permission to read/write on your own files/folders.

I mentioned before that I got Dedicated Virtual (DV) VPS package from Media Temple previously. It has been a while since I subscribed with Media Temple. So far I am happy with their services and I have moved my blog over to Media Temple 2 months ago. Since then I never bother to patch my WordPress until Version 3 released, mainly was because I am too lazy to download, backup, untar, copy over for upgrade. I prefer the One Click WordPress Upgrade option, yes.. That’s how Lazy I am!

I just had mod_suphp installed on my Plesk, and first thing is I did was upgraded my WordPress to Version 3, well also all my plugins. Here is the how-to of suphp installation and configuration on Media Temple Dedicated Virtual package.

First, install mod_suphp from yum


shell> yum install mod_suphp

After installation, you should see suphp configuration files located at
/etc/httpd/conf.d/mod_suphp.conf
/etc/suphp.conf

On mod_suphp.conf, you can refer to the configuration I have below;


LoadModule suphp_module modules/mod_suphp.so
suPHP_AddHandler php5-script
suPHP_Engine on

You will notice that the Handler is php5-script, it’s the php’s handler configured on Plesk, so we will not disturb that. You need to make the handler recognize on suphp, and follow the configuration for /etc/suphp.conf


[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/var/www/

; 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

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=500

; Minimum GID
min_gid=500

; Use correct permissions for mod_userdir sites
; handle_userdir=false

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
php5-script="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi=execute:!self

After restart apache services, all your website hosted on the server will have suphp support, you might want to check all the permission of your files and folders before restart apache. Make sure the folder is mod is 755 and file mod is 644.

You can do the quick mod change with find command


shell> find /var/www/vhost/domain-name/httpdocs/* -type f -exec chmod 644 {} ;
shell> find /var/www/vhost/domain-name/httpdocs/* -type d -exec chmod 755 {} ;

That’s it! mod_suphp on Plesk. Nice and Clean.

Tags: , , , , , ,

One Response to “Install and Configure mod_suphp or suphp on Plesk Server”

  1. Betty Says:

    Thank you somuch!!!!!!!!!!!!

Leave a Reply