After spending some time on how to make Plesk work with suPHP, finaly ended with a simple and ‘yet-working’ solution. Note that this solution applies to all users and directories in Plesk (so no need to edit every httpd.include individualy)
Here’s how :
First, you need to install the suphp apache modules and suphp itself by doing :
کد:
apt-get install libapache2-mod-suphp suphp-common
You should now have the mod_suphp.so installed in the apache library folder (/usr/lib/apache2/modules/).
Then, and don’t wonder why it was ’so’ simple to do, edit /etc/apache2/apache2.conf) and add the following line at the end :
کد:
php_admin_flag engine on
suPHP_Engine On
AddHandler x-httpd-php .php .php4 .php3 .php5 .phtml
suPHP_AddHandler x-httpd-php
Restart Apache :
Voilà, you have suPHP working, now every file that will be created would use the uid/gid of the running user !
(don’t forget to edit /etc/suphp/suphp.conf and put the right path to php5-cgi)
Edit :
After this modification it turns out that .htaccess files are being parsed correctly, to solve this issue you’ll
have to add a line at the end of any .htaccess
کد:
AddHandler application/x-httpd-php .php