You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jan Engelhardt <je...@linux01.gwdg.de> on 2005/09/14 17:05:52 UTC

[users@httpd] Per-user CGI does not work

Hello,


I am using

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

in mod_userdir.conf (Apache 2.0.53) as the help page for mod_userdir says to 
enable per-user CGI programs. However, when I try to open up a sample prog, I 
always get error 500.

	#!/bin/bash
	cat <<EOT;
	Content-Type: text/html
	
	<html>
	<body>
	CGI says: alive
	</body>
	</html>
	EOT

It does work when I put it in /var/www/main.vhost/cgi-bin/, and yes, it is 
chmod 755'ed.
Is there some option I forgot? Any help is appreciated, thanks.


Jan Engelhardt
-- 

---------------------------------------------------------------------
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


[users@httpd] Per-user CGI does not work

Posted by Joshua Slive <js...@gmail.com>.
On 9/14/05, Jan Engelhardt <je...@linux01.gwdg.de> wrote:
> [2005-09-14 20:24:54]: uid: (10721/cf) gid: (100/100) cmd: index.cgi
> [2005-09-14 20:24:54]: cannot get docroot information (/home/cf)

First, if you don't need suexec or you don't understand what it is,
then you should simply turn it off by finding the suexec binary,
renaming it, and restarting apache.

If you do need suexec, then, as root, run suexec -V to get a listing
of its configuration settings.  Then see
http://httpd.apache.org/docs/2.0/suexec.html for a listing of all the
security checks that need to be passed to make it work.  Post again
with the output of suexec -V if you need more help.

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


Re: [users@httpd] Per-user CGI does not work

Posted by Jan Engelhardt <je...@linux01.gwdg.de>.
>On 9/14/05, Jan Engelhardt <je...@linux01.gwdg.de> wrote:
>> 
>> in mod_userdir.conf (Apache 2.0.53) as the help page for mod_userdir says to
>> enable per-user CGI programs. However, when I try to open up a sample prog, I
>> always get error 500.
>
>And what does the error log say?

[Wed Sep 14 20:24:54 2005] [error] [client 192.168.22.4] Premature end of 
script headers: index.cgi

>> It does work when I put it in /var/www/main.vhost/cgi-bin/, and yes, it is
>> chmod 755'ed.
>> Is there some option I forgot? Any help is appreciated, thanks.
>
>This is almost surely either a permissions issue (quite possibly
>SELinux-related, if you are on Fedora) or suexec-related.  If the
>problem is suexec, you should check the suexec.log for more details.

[2005-09-14 20:24:54]: uid: (10721/cf) gid: (100/100) cmd: index.cgi
[2005-09-14 20:24:54]: cannot get docroot information (/home/cf)

What does this mean?



Jan Engelhardt
-- 

---------------------------------------------------------------------
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] Per-user CGI does not work

Posted by Joshua Slive <js...@gmail.com>.
On 9/14/05, Jan Engelhardt <je...@linux01.gwdg.de> wrote:
> 
> in mod_userdir.conf (Apache 2.0.53) as the help page for mod_userdir says to
> enable per-user CGI programs. However, when I try to open up a sample prog, I
> always get error 500.

And what does the error log say?

> It does work when I put it in /var/www/main.vhost/cgi-bin/, and yes, it is
> chmod 755'ed.
> Is there some option I forgot? Any help is appreciated, thanks.

This is almost surely either a permissions issue (quite possibly
SELinux-related, if you are on Fedora) or suexec-related.  If the
problem is suexec, you should check the suexec.log for more details.

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