VirtualDocument & suexec

VirtualDocument & suexec

Post by Mark Mo » Mon, 18 Sep 2000 04:00:00



Dear all,

    I have set up a apache with vhost_alias and suexec enabled.

I have the following,

VirtualDocumentRoot /home/%1/public_html
VirtualScriptAlias /home/%1/cgi-bin/

How to make the .cgi run by the users?

As of the case in VirtualHost, we can give User/Group directive,
<VirtualHost 192.168.0.1>
ServerName abc.domain.com
DocumentRoot "/home/abc/public_html"
User abc
Group xyz
</VirtualHost>

But how to do the similar things in Dynamic Virtual Hosting with the
mod_vhost_alias?

Thanks in advance.

But

 
 
 

VirtualDocument & suexec

Post by David Efflan » Mon, 18 Sep 2000 04:00:00



>    I have set up a apache with vhost_alias and suexec enabled.

>I have the following,

>VirtualDocumentRoot /home/%1/public_html
>VirtualScriptAlias /home/%1/cgi-bin/

>How to make the .cgi run by the users?

>As of the case in VirtualHost, we can give User/Group directive,
><VirtualHost 192.168.0.1>
>ServerName abc.domain.com
>DocumentRoot "/home/abc/public_html"
>User abc
>Group xyz
></VirtualHost>

>But how to do the similar things in Dynamic Virtual Hosting with the
>mod_vhost_alias?

Suexec for VirtualHosts only works below the main DocumentRoot.

Simply put the VirtualHost directories under the main DocumentRoot per the
docs for suexec.  As long as as those directories are owned by the User
and Group specified for that VirtualHost, suexec will work there.  To make
it easy for the users to access their web files, put a symlink from the
real vhost dir to something like 'www' in their home dir.

You cannot symlink the other way around becasue suexec will not follow
symlinks.

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/

 
 
 

VirtualDocument & suexec

Post by Tony Finc » Tue, 19 Sep 2000 04:00:00



>    I have set up a apache with vhost_alias and suexec enabled.

>I have the following,

>VirtualDocumentRoot /home/%1/public_html
>VirtualScriptAlias /home/%1/cgi-bin/

>How to make the .cgi run by the users?

Unfortunately suexec doesn't work with mod_vhost_alias. You'll have
to modify it to remove some of the security checks that depend on
information passed by Apache, and you'll have to modify Apache to
call suexec without this extra information. A simpler alternative
might be to use cgiwrap instead -- http://www.unixtools.org/cgiwrap/

The reason for the poor support is that in the environment where
mod_vhost_alias was developed we used our own cgi wrapper which
predated suexec, and I never got around to developing an suexec-
based replacement.

Tony.
--
en oeccget g mtcaa    f.a.n.finch