cgi scripts fail to run from userdir with "End of script output before headers" errors

James McDonald james at jamesmcdonald.id.au
Tue Oct 14 04:12:00 PDT 2014


I remember getting those sorts of errors(end of script before headers sent)
when there was white space in the wrong place in a cgi file.

But this isn't your problem and I can't think of anything more as to why
your setup isn't working....

My 'working' setup had no other mods other than disable selinux and the
ones I listed in userdir.conf...

So my next guess is I think you have gotten your gremlins wet.



On 14 October 2014 06:16, Lonni J Friedman <netllama at gmail.com> wrote:

> Wow, thanks James for going through this much effort.  I applied the
> changes that you listed for userdir.conf, but I'm still getting the
> same error as originally.  At this point, I have no clue wtf is going
> on here.  It should work, but the error is so useless that I can't
> debug this effectively.
>
> On Fri, Oct 10, 2014 at 10:33 PM, James McDonald
> <james at jamesmcdonald.id.au> wrote:
> > OK this got me so annoyed I installed F20 and then disabling selinux and
> > installing httpd and wsgi just using the m.py I have it working with the
> > following in userdir.conf (making sure ~/public_html/* is owned by the
> user
> > and m.py is +x
> >
> >
> > # contents of userdir.conf
> >
> > <IfModule mod_userdir.c>
> >     #
> >     # UserDir is disabled by default since it can confirm the presence
> >     # of a username on the system (depending on home directory
> >     # permissions).
> >     #
> >     UserDir public_html
> >
> >     #
> >     # To enable requests to /~user/ to serve the user's public_html
> >     # directory, remove the "UserDir disabled" line above, and uncomment
> >     # the following line instead:
> >     #
> >     #UserDir public_html
> > </IfModule>
> >
> > #
> > # Control access to UserDir directories.  The following is an example
> > # for a site where these directories are restricted to read-only.
> > #
> > <Directory "/home/*/public_html">
> >     AllowOverride FileInfo AuthConfig Limit Indexes
> >     Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
> >     Require method GET POST OPTIONS
> > </Directory>
> > <Directory "/home/*/public_html/cgi-bin">
> > AllowOverride All
> > Options ExecCGI
> > SetHandler cgi-script
> > </Directory>
> >
> >
> >
> >
> >
> >
> > On 11 October 2014 08:35, Lonni J Friedman <netllama at gmail.com> wrote:
> >>
> >> On Fri, Oct 10, 2014 at 2:32 PM, James McDonald
> >> <james at jamesmcdonald.id.au> wrote:
> >> > Had to trim reply's this thread is greater than > 40KB.
> >> >
> >> > Have you tried piping the environment that suexec / apache is passing
> to
> >> > the
> >> > m.py to a file and having a look?
> >> >
> >> > e.g. env | /tmp/myout or something pythonesque?
> >> >
> >> > Can you do that with STDERR too?
> >>
> >> I can do that when running the script out of /var/www/cgi-bin, but
> >> there's nothing unusual there.
> >>
> >> >
> >> > May give you a hint.
> >> >
> >> > And is your netlama UID > 500?
> >>
> >> 1000
> >>
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> L. Friedman                                    netllama at gmail.com
> LlamaLand                       http://netllama.linux-sxs.org
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> http://mailman.celestial.com/mailman/listinfo/linux-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/linux-users/attachments/20141014/c70daac4/attachment.html>


More information about the Linux-users mailing list