Ok.

This is exactly the type of answer I was NOT looking for.

While I believe that your links may contain the answer I have already proven to myself beyond any doubt that I am too stupid to properly understand them...

Here is my app:

#!/home/mh/perl514/bin/plackup -s FCGI --listen /tmp/fcgi.sock --daemo +nize --nproc 10 use strict; use warnings; return sub { return [ 200, ["Content-Type" => "text/plain"], ["hi"] ]; }
Started on it's own it actually works - it starts a web-server on port 5000 that delivers the proper result.

But how to make this work in Apache?

I have put this app as "app.psgi" in /usr/lib/cgi-bin and this is my apache-config:

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all AddHandler fcgid-script .psgi </Directory>
Now what happens is that when I try point my browser to the plack-app apache I get an internal server error.

The plack-app actually is launched (there is a process visible), but it seems to me that the plack-app and apache cannot communicate as I can see in the error log that fcgid reports a read timeout and the really weird thing is that I have this line in the error log HTTP::Server::PSGI: Accepting connections at http://0:5000

So to me it seems as if Plack is not aware that it runs under apache for some reasons...

The beer is still for grabs...


In reply to Re^2: Plack beer challenge by morgon
in thread Plack beer challenge by morgon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.