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

Lonni J Friedman netllama at gmail.com
Mon Oct 13 12:16:28 PDT 2014


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


More information about the Linux-users mailing list