I'm using apache on Linux.

I just set up a very simple IP based vhost configuration.  Each user
will have a www/ directory in their home directory for html stuff and
www/cgi-bin/ for the cgi stuff.  Does anyone know the best method for
allowing the cgi-bin?

I am initially trying to use suEXEC.  I need to safely allow each user
to be able to have cgi scripts.  These scripts need to be run as the
user so that they can read/write their own home directories safely.

Here is my main httpd.conf (not the vhost stuff):
ServerRoot /etc/httpd/2.0
DocumentRoot /var/www/html
...

Here is how I am setting up the Vhosts and suEXEC:
<VirtualHost 192.168.0.5>
SuexecUserGroup erin erin
DocumentRoot /home/erin/www
ServerName test2.com
</VirtualHost>

Here lies the problem.  The main document root is set to /var/www/html. 
Each vhost as a separate DocumentRoot.  When I run a script, the suexec
error log seems to be complaining that the script is not within the
DocumenetRoot!  It surely should be under the vhost's Document root ..
just not under the main DocumentRoot.  Just to test it I even changed
the main DocumentRoot to /home.  I still get the same error.  How do I
correct this?

Here is the exact error:
[2003-08-10 05:48:17]: uid: (502/erin) gid: (502/502) cmd: test.cgi
[2003-08-10 05:48:17]: command not in docroot
(/home/erin/www/cgi-bin/test.cgi)

I even read a bit more it appears that there is a Document Root and User
Dir compile time option for usexec.  These are set to the correct things
(as far as I know).

Thanks,
Michael and Erin



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to