1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

suPHP installation on PSA Linux 7.5.4

Discussion in 'Plesk for Linux - 8.x and Older' started by Mistery, Feb 10, 2006.

  1. Mistery

    Mistery New Pleskian

    22
    40%
    Joined:
    Jul 18, 2004
    Messages:
    6
    Likes Received:
    0
    Location:
    Italy
    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.
     
  2. Mistery

    Mistery New Pleskian

    22
    40%
    Joined:
    Jul 18, 2004
    Messages:
    6
    Likes Received:
    0
    Location:
    Italy
    Well, it seems anybody succesfully installed suPHP ;-)
    How did you solve the files/folders permission issue with PHP scripts running as apache:apache ?
     
  3. Zella

    Zella Guest

    0
     
    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.
     
  4. BDMM

    BDMM Basic Pleskian

    24
    90%
    Joined:
    Apr 28, 2005
    Messages:
    31
    Likes Received:
    1
    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
     
  5. BDMM

    BDMM Basic Pleskian

    24
    90%
    Joined:
    Apr 28, 2005
    Messages:
    31
    Likes Received:
    1
    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
     
  6. voodoochile

    voodoochile Guest

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

    Welcome to Plesk!
     
  7. baden03

    baden03 Guest

    0
     
    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.
     
Loading...