• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

suPHP installation on PSA Linux 7.5.4

Mistery

New Pleskian
Hello,
did anyone succesfully installed suPHP on Plesk Reloaded 7.5.4 ?
If so, could you please post step by step instructions on how to install it.
I have actually compiled and installed suPHP on one of my Plesk nodes, Apache loads the module but it seems PHP don't make use of it.
Thanks.
 
Well, it seems anybody succesfully installed suPHP ;-)
How did you solve the files/folders permission issue with PHP scripts running as apache:apache ?
 
Hi Mistery,

I'll appreciate information on how you compiled the suPHP.

I tried but when I reload apache I always receive an error.

Cannot load /etc/httpd/modules/mod_suphp.so
into server: /etc/httpd/modules/mod_suphp.so: undefined symbol:ap_table_get

Thanks.
 
I think I finally cracked it.

wget http://www.suphp.org/download/suphp-0.5.2.tar
tar -zxvf suphp-0.5.2.tar.gz
cd suphp-0.5.2
./configure --with-prefix=/usr --with-apxs=/usr/sbin/apxs --with-min-uid=0 --with-min-gid=0 --with-apache-user=apache --with-php= /usr/bin/php --with-setid-mode=owner
make
make install

pico /etc/httpd/conf/httpd.conf

Look for at the end of file
LoadModule suphp_module /usr/lib/httpd/modules/mod_suphp.so

Delete this line and then add the following in the LoadModule Sections prior to Include conf.d/*.conf

LoadModule suphp_module modules/mod_suphp.so

I only wanted suphp to run on specific sites so there are a couple of options you can do.

As suphp ignores the php_admin_flags in the site vhost.conf files you need to create new php.ini for each site

cp /etc/php.ini /etc/phpvirtual/<domain.com>/php.ini

Then in <domain.com>conf/vhost.conf add the line

suPHP_ConfigPath "/etc/phpvirtual/<domain.com>"

To enable suphp for that entire site add

suPHP_Engine on

However this may affect things like horde and sitebuilder as discussed in other threads. I still haven't checked these out as I only wanted to run suphp on certain directories. I'm running oscommere and it complained if suphp is running on all site so I have only applied it to the admin directory

To do this

pico <domain.com>conf/httpd.include

Find the directory and include the suPHP_Engine On flag

<Directory "/var/www/<domain.com>/httpdocs/admin">
suPHP_Engine On
</Directory>


service httpd restart

And thats it.
I presume that plesk will overite this file so I still nedd to do some experimentation to see if the directory commands can be included in the vhost.conf file. We shall see.

Thanks :p
 
Couple of changes

should be

wget http://www.suphp.org/download/suphp-0.5.2.tar.gz

Also it is possible to put the engine_on in the vhost file

<Directory "/var/www/<domain.com>/httpdocs/admin">
suPHP_Engine On
</Directory>

PS. if running ssl also include this in the vhost_ssl.conf

service httpd restart

The only issue I came across is that files owned by apache no longer become available to suphp so you need to revert the owner group back to the site owner.

I would be interested in any feedback especially regarding the fact that php can now read/write over all files belonging to that site. I would recommend putting open_basedir rules in effect.

Has anyone tried 0.6.1? I see [dag] has a rpm but this seems to run site wide. Perhaps [atomicrocket] could build a rpm for us :D

BD
 
Now you get to wait for the new Plesk update to hump your box.

Welcome to Plesk!
 
suPHP version?

Has SWSOFT addressed this yet? This experience has been a battle at every step.

oh, and to get the apxs (if you are getting errors) you need to install the httpd-devel rpm. You'll find the apxs in /usr/sbin afterwards.
 
Back
Top