You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Antony Paul <an...@hotmail.com> on 2004/07/21 08:56:56 UTC

[users@httpd] suexec and virtual hosts

Hi all,
    I have a default installation of Apache 1.3.27 on a RedHat Linux system.
Running suexec -V shows the following details
-D DOC_ROOT="/var/www"
 -D GID_MID=100
 -D HTTPD_USER="apache"
 -D LOG_EXEC="/var/log/httpd/suexec_log"
 -D SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D UID_MID=100
 -D USERDIR_SUFFIX="public_html"

The virtual hosts are owned by different users and their home directories
are in /home directories whereas the DocumentRoot is in
/usr/sitename/webapps/ROOT and cgi scripts are under DocumentRoot/cgi-bin.
This have proper ScriptAlias.
My question is it possible to run Apache with suexec enabled for these
virtual hosts. I am getting a command not in docroot error.

rgds
Antony Paul

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] suexec and virtual hosts

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 21 Jul 2004 12:26:56 +0530, Antony Paul
<an...@hotmail.com> wrote:
> Hi all,
>     I have a default installation of Apache 1.3.27 on a RedHat Linux system.
> Running suexec -V shows the following details
> -D DOC_ROOT="/var/www"
>  -D GID_MID=100
>  -D HTTPD_USER="apache"
>  -D LOG_EXEC="/var/log/httpd/suexec_log"
>  -D SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
>  -D UID_MID=100
>  -D USERDIR_SUFFIX="public_html"
> 
> The virtual hosts are owned by different users and their home directories
> are in /home directories whereas the DocumentRoot is in
> /usr/sitename/webapps/ROOT and cgi scripts are under DocumentRoot/cgi-bin.
> This have proper ScriptAlias.
> My question is it possible to run Apache with suexec enabled for these
> virtual hosts. I am getting a command not in docroot error.

No, you can't do this with your current suexec.  All suexec requests
(except those beggining in ~ for userdir's) must be under the suexec
docroot, which is /var/www.  You either need to move the DocumentRoot
under /var/www or recompile suexec with --suexec-docroot set to /usr. 
This last option could be a little dangerous, since there is lots of
stuff under /usr that you wouldn't want run through suexec.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org