httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Murray" <donaldm...@hotmail.com>
Subject Re: [users@httpd] Cannot get per-user CGI directories to work
Date Mon, 19 Jan 2004 22:12:23 GMT
Thanks Joshua, Rich.

As you both suggested, suexec was the cause of my woes. I moved suexec to
suexec.disabled_by_me, restarted apache, and now my per-user CGIs are 
working.

Is there a way to disable suexec within httpd.conf?


>From: Rich Bowen <rbowen@rcbowen.com>
>Reply-To: users@httpd.apache.org
>To: users@httpd.apache.org
>Subject: Re: [users@httpd] Cannot get per-user CGI directories to work
>Date: Mon, 19 Jan 2004 16:56:17 -0500 (EST)
>
>On Mon, 19 Jan 2004, Donald Murray wrote:
>
> > Does anyone have per-user CGI directories working?
> >
> > My initial motivation was to have all user-specific html/CGI in
> > a separate tree (/opt/www/users), thereby avoiding serving
> > anything from beneath /home. There are related recipes in the
> > Apache Cookbook (5.4 and 5.7), so it should be possible. I'm
> > apparently too stubborn to give up on the idea. ;-)
>
>Well, we tested our recipes, so it should work. ;-)
>
> > I have already succeeded in getting users' pages served from
> > /opt/www/users/mylogin/html, but cannot get CGIs to work in
> > /opt/www/users/mylogin/html/cgi-bin.
> >
> > I placed foo.cgi in /var/www/cgi-bin:
> > #!/usr/bin/perl -w
> > print "Content-type: text/html\n\n";
> > print "Hello, World.\n";
> >
> > This works fine. When I copy foo.cgi to 
>/opt/www/users/mylogin/html/cgi-bin/
> > and try to run it, I get a 500 error: 'Premature end of script headers'.
>
>Well, that means that it is at least *trying* to execute it, so you are
>at least halfway there.
>
> > Because the CGI works fine in /var/www/cgi-bin, but not in my user
> > directory /opt/www/users/mylogin/html/cgi-bin, I figured it's something
> > to do with:
> > 1. my permissions/ownership; or
> > 2. my httpd.conf.
> >
> > Things I've eliminated:
> > - all directories above /opt/www/users/mylogin/html/cgi-bin have been
> > chmod'd o+x
> > - the /opt/www/users/mylogin/html/ and 
>/opt/www/users/mylogin/html/cgi-bin
> > have been chmod'd o+rx
> > - the CGI is executable
> > - perl does reside in /usr/bin
> > - the CGI does run correctly from the command-line
> > - the httpd error_log merely states:
> > [Mon Jan 19 14:32:14 2004] [error] [client 192.168.0.10] Premature end 
>of
> > script headers: foo.cgi
>
> > <Directory /opt/www/users/*/html/cgi-bin>
> >     AllowOverride None
> >     Options ExecCGI
> >     AddHandler cgi-script .cgi .pl
> >     Deny from all
> >     Allow from 127.0.0.1 192.168.0.0/255.255.255.0
> > </Directory>
>
>This is ok, and the results above indicate that the configuration is
>correct, but that there's something wrong with either the script itself,
>or file permissions.
>
>The fact that it works on one directory and not another points to a
>suexec-related problem.
>
>Look in the suexec log for a message about mismatched file permissions
>or something like that.
>
>--
>Who can say where the road goes
>Where the day flows
>Only time
>  --Pilgrim (Enya - A Day Without Rain)
>
>
>---------------------------------------------------------------------
>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
>

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca


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


Mime
View raw message