[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache virtualhosts with different user



On Wed, 9 Jan 2002, Gabor Gludovatz wrote:

> if I define 'user' in virtualhost section of apache's httpd.conf, then my
> cgi scripts will be running as 'user' if suexec has been set up correctly.
> It's okay. But how can I tell apache to run the whole virtualhost as
> 'user'? Including accessing html files, and especially php.
> 
If it's *ONLY* php and CGI you want to run as the user, try using
the cgi-version of php. I'm not sure that will work  - but you could take
a look 

> Is it possible somehow? Having read the apache docs, I haven't found
> anything useful, but there must be a solution if I don't want my users to
> run php scripts as www-data.

As the php-scripts will be parsed by the php-program (which is a regular
CGI for apache). And here's the problem: I'm not sure
if the cgi will
run as the owner of the cgi-file, or as the owner of the php file. 
Maybe the php version can be configured to switch to the owner of the file
it's executing. I think it supports that, but am not sure...

Dries





Reply to: