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

James McDonald james at jamesmcdonald.id.au
Fri Oct 10 22:33:52 PDT 2014


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/20141011/7fd0b88a/attachment.html>


More information about the Linux-users mailing list