httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kövesdán Gábor <>
Subject Re: [users@httpd] SuExec issues
Date Wed, 14 Feb 2007 20:19:05 GMT
Joshua Slive schrieb:
> On 2/7/07, Kövesdán Gábor <> wrote:
>> Joshua Slive schrieb:
>> > On 2/7/07, Kövesdán Gábor <> wrote:
>> >> However, if I set modes for the files
>> >> to 600, i get 403. I don't see why this is happening, since the pages
>> >> should be read/run as foo.
>> >
>> > Do you understand that suexec affects only CGI scripts and not normal
>> > requests or requests served by apache modules?  Are you running php as
>> > a CGI?
>> Oh, I didn't know that, sorry. I run php with mod_php, not as pure CGI.
>> Is there any tool for doing the same for mod_php?
> There are various ways to accomplish this.  Which works best depends
> on the number of different users you host, and the demands of the php
> scripts they use.
> The simplest thing to do is simply to run the CGI version of php
> rather than mod_php.  It should be fast enough for most simple sites.
> (There is a mod_suphp available that makes the setup of php-cgi +
> suexec a little simpler, but I'd recommend just using the regular
> versions.)
> For sites requiring something faster, you can run multiple instances
> of apache under different userids with a reverse proxy in front:
> (This obviously only works with a limited number of separate users.)
> Or, you can use php as a CGI plus fastcgi.  This is good for sites
> that have not-too-many separate users and a mix of php and non-php
> content.
> (Hmmm... After writing all that, somebody ought to make a wiki page
> someplace with a list like this.)
Thanks for the detailed explanation. I'm running php as CGI now, but
I've run into a strange issue.
Firstly, I got this message:
[2007-02-12 20:37:45]: cannot get docroot information (/usr/local/www/data)
I wondered why I get this, since the DocumentRoot is different for the
given VirtualHost, but I've modified the modes on this directory, and
this messgae vanished. The next one was:
[2007-02-12 20:39:34]: command not in docroot (/usr/local/bin/php-cgi)
I see, it is not in the above directory, but why is it necessary? How
can I avoid installing php there?
Ok, I copied the php-cgi binary there (symlinking did not work) and the
next one was:
[2007-02-12 20:45:23]: target uid/gid (1003/1003) mismatch with
directory (0/0) or program (1003/1003)
I still can solve it by chowning php-cgi, but one issue remained: if I
have e.g. 20 websites, how can I get all of them to work when it can
only be chowned to one of them? Besides, the external php modules did
not work for me with this solution.

Thanks in advance for the answers,

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message