flowdy has asked for the wisdom of the Perl Monks concerning the following question:
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:
This outputs:<p>Request info: <% $m->req->env->{SCRIPT_NAME} %> This is the default home page generated by <code><% $m->request_path % +>.</p>
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
Requesting root http://$HOST/, I get following error message: SCRIPT_NAME must not be / at /usr/share/perl5/Plack/Middleware/Lint.pm line 40# in /usr/local/my_site/conf/global.cfg env: comps_dir: [ '/web/htdocs', "${root_dir}/comps" ] mason: top_level_extensions: [ '.html', '.mc' ]
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mason via Poet+Plack (FCGI): Request path gets lost
by Anonymous Monk on Jun 25, 2014 at 10:54 UTC | |
by flowdy (Scribe) on Jun 25, 2014 at 12:10 UTC | |
by Anonymous Monk on Jun 26, 2014 at 01:03 UTC | |
by flowdy (Scribe) on Jun 26, 2014 at 12:53 UTC | |
|
Re: Mason via Poet+Plack (FCGI): Request path gets lost
by Anonymous Monk on Jun 25, 2014 at 10:42 UTC | |
by flowdy (Scribe) on Jun 25, 2014 at 10:59 UTC |