Wed, 28 Jan 2004 16:11:59 +0200 Lorderon <[EMAIL PROTECTED]>:

> "Mike Migurski" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> >I have PHP installed on Apache and Unix with several vhosts so each vhost
>> >has its own user account on Unix. Now when accessing a webpage, Apache
>> >runs with user httpd.. but I want it to run as the user of the vhost
>> >account.. How can I do that?
>>
>> http://httpd.apache.org/docs/suexec.html
>>
>
> The SuEXEC is not good for my purpose, since I want to run PHP as Apache
> Module (and not CGI).
> I'm using Apache 1.3... does the User / Group directives change the
> user/group in case I use Apache Module for PHP?

yes

> Also, I read about the AssignUserID directive, but couldn't figure out if it
> affects Apache Module or only CGI module for PHP?

AssignUserID is for apache2
apache2 has a MPM called perchild. with this MPM you can assign a user/group to
each vhost (but there is still work in progress...)
-> http://httpd.apache.org/docs-2.0/en/mod/perchild.html

with apache1.3 and php as apache-module all vhosts have the same user/group
what you can do:
add the apache-user to each vhost-group and work with open_basedir:
<VirtualHost *:80>
      ...skip...
      <Directory "/somedir">
            ...skip...
            php_admin_value open_basedir "/somedir:/tmp"
      </Directory>
</VirtualHost>

because some functions ignore open_basedir I also modified disable_functions in
php.ini:
disable_functions = "exec, passthru, shell_exec, system, proc_open, popen"

a more complicated way would be:
- create virtual-interfaces in linux
- run apache on each interface with different user/group


g. tinu

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to