Results 1 to 6 of 6

Thread: suPHP and VirtualHosts

  1. #1
    Join Date
    Apr 2005
    Location
    Poland
    Beans
    296

    suPHP and VirtualHosts

    Hello,

    I got 2 virtual hosts running for a while. One got php scripts.

    I would like to use suPHP for e.g.VirtualHost2, so I have compiled it.

    Apache loads the module w/out problems. I still can't get suPHP_UserGroup to work on that virtualHost2. (i have compiled it with the correct flag etc)

    added to /etc/apache2/apache2.conf
    Code:
    LoadModule suphp_module       /usr/lib/apache2/modules/mod_suphp.so
    Edit: also i've chowned the test file to the correct user/group before testing the whoami.php
    Also i've just tried adding the su_PHPGroupName globally and it didn't work for VirtualHOst2
    and in /etc/apache2/sites-available/VirtualHost2 i have:

    Code:
    <VirtualHost *:80>
    #ServerAdmin    xxxx
    ServerName      xxx
    ServerAlias     xxx
    DocumentRoot     xxx
    CustomLog        xxx
    
    #enable suPHP engine
    suPHP_Engine On
    suPHP_UserGroup  someuser someuser
    AddHandler application/x-httpd-php .php .php3 .php4 .php5
    suPHP_AddHandler application/x-httpd-php
    </VirtualHost>
    While testing,after reseting apache2 with a:
    Code:
    <?php
    
    echo "Output of the 'whoami' command:<br /><br />\n";
    
    echo exec('/usr/bin/whoami');
    
    ?>
    on the server, i get;

    Output of the 'whoami' command:

    www-data

    I assume that the module is running, but it's not using the user/group :/

    Not sure how it should be configured. If i put that into the apache2.conf then it will be global :/


    There is nothing in logs, apache, and suphp

    pls advise.

    thank you.
    Last edited by [pl]ice; January 17th, 2011 at 03:25 PM. Reason: more info

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: suPHP and VirtualHosts

    I've not used the module, but have you created the user(s) and group(s) in /etc/passwd and /etc/group?

  3. #3
    Join Date
    Jun 2007
    Location
    Michigan, USA
    Beans
    465

    Re: suPHP and VirtualHosts

    Did you try the example configuration on suPHP site?

    http://www.suphp.org/DocumentationVi...p.conf-example
    Ubuntu 14.04 Server
    -Linode 1GB
    Ubuntu Mate 16.04 Laptop
    -Toshiba Satellite A505-6005, Intel i3, 4.00 GB ram

  4. #4
    Join Date
    Jun 2007
    Location
    Michigan, USA
    Beans
    465

    Re: suPHP and VirtualHosts

    Did you try the example configuration on suPHP site?

    http://www.suphp.org/DocumentationVi...p.conf-example
    Ubuntu 14.04 Server
    -Linode 1GB
    Ubuntu Mate 16.04 Laptop
    -Toshiba Satellite A505-6005, Intel i3, 4.00 GB ram

  5. #5
    Join Date
    Apr 2005
    Location
    Poland
    Beans
    296

    Re: suPHP and VirtualHosts

    Yes, the user is valid and working. :/

    No, i haven't tried. I will try it and let you guys know.

    thanks

  6. #6
    Join Date
    Mar 2007
    Beans
    26

    Re: suPHP and VirtualHosts

    Quote Originally Posted by [pl]ice View Post
    Yes, the user is valid and working. :/

    No, i haven't tried. I will try it and let you guys know.

    thanks
    I've never used suphp but if you want easy configuration, mpm_itk works out of the box: http://www.howtoforge.com/running-vh...on-ubuntu-9.04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •