You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Stuart Johnston <sa...@utdallas.edu> on 2002/06/05 09:29:40 UTC

Trouble with user cgi-bin FAQ

I am trying to create cgi-bin directories for my users.  I have seen the 
FAQ (http://httpd.apache.org/docs/misc/FAQ.html#user-cgi).  It suggests 
two options:

    1.   Place the cgi-bin directory next to the public_html directory:

       ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2

    2. Place the cgi-bin directory underneath the public_html directory:

       <Directory /home/*/public_html/cgi-bin>
               Options ExecCGI
               SetHandler cgi-script
       </Directory>


Option 2 seems to work fine but I would really rather use option 1. 
When I add the ScriptAliasMatch to my config file, I get errors like this:
[error] [client x.x.x.x] Premature end of script headers: 
/home/saj/cgi-bin/test-cgi

The script itself is ok - it works fine in the main cgi-bin.  Any 
suggestions?

Thanks,
Stuart Johnston


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Trouble with user cgi-bin FAQ

Posted by Stuart Johnston <sa...@utdallas.edu>.
Joshua Slive wrote:
> On Wed, 5 Jun 2002, Stuart Johnston wrote:
> 
>>Option 2 seems to work fine but I would really rather use option 1.
>>When I add the ScriptAliasMatch to my config file, I get errors like this:
>>[error] [client x.x.x.x] Premature end of script headers:
>>/home/saj/cgi-bin/test-cgi
> 
> 
> Are you running suexec?  If so, look to see what the suexec log file says.
> It is not generally possible to use option 2 with suexec because suexec
> checks to make sure all cgi scripts are under public_html.

Yup, looks like that was the problem.

Thanks much,
Stuart Johnston


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Trouble with user cgi-bin FAQ

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 5 Jun 2002, Stuart Johnston wrote:
> Option 2 seems to work fine but I would really rather use option 1.
> When I add the ScriptAliasMatch to my config file, I get errors like this:
> [error] [client x.x.x.x] Premature end of script headers:
> /home/saj/cgi-bin/test-cgi

Are you running suexec?  If so, look to see what the suexec log file says.
It is not generally possible to use option 2 with suexec because suexec
checks to make sure all cgi scripts are under public_html.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org