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.
Bookmarks