Hi Monks,

Whatever the requested URL, all I get is either the default start page of Poet framework or a static index.html when provided in another directory registered in conf/global.cfg poet file env.comp_dir = [...].

For debugging purposes, I edited the Poet's standard index.mc file to contain the following:

<p>Request info: <% $m->req->env->{SCRIPT_NAME} %> This is the default home page generated by <code><% $m->request_path % +>.</p>
This outputs:
Request info: /demo.mc This is the default home page generated by /.
Seems like Plack does know the requested path but doesn't forward it to Poet/Mason. How come? I append some configuration you might need, please tell if you need for any other:
# in httpd.conf of Apache 2.4 LoadModule fcgid_module modules/mod_fcgid.so <IfModule fcgid_module> #FcgidIPCDir "/tmp/fcgidsock" FcgidMaxProcessesPerClass 100 </IfModule> <Directory "/usr/local/my_site"> Require all granted </Directory> <Location /> SetHandler fcgid-script Options +ExecCGI FcgidWrapper "/usr/local/my_site/bin/start-fcgi.sh" virtual Require all granted </Location> # in start-fcgi.sh is just one line after shebang: # exec plackup -s FCGI app.psgi
# in /usr/local/my_site/conf/global.cfg env: comps_dir: [ '/web/htdocs', "${root_dir}/comps" ] mason: top_level_extensions: [ '.html', '.mc' ]
Requesting root http://$HOST/, I get following error message: SCRIPT_NAME must not be / at /usr/share/perl5/Plack/Middleware/Lint.pm line 40

My versions installed: Mason 2.21, Poet 0.13 (despite of 0.something major release version, installed from Ubuntu Trusty LTS 14.04 official repo, hence I dare considering it "stable". Current version 0.15 according to CPAN but Changes file didn't expose any apparently imported fixes), Plack 1.003, Apache 2.4.9, Mod_fcgid 2.3.9.

Oh wise, as any promising idea strives mindwards from your meditation so deep, could you please tell me? There is poor information on the net, unless I just searched with bad keywords.

-- flowdy


In reply to Mason via Poet+Plack (FCGI): Request path gets lost by flowdy

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.