Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Plack and mod_fcgid

by sundialsvc4 (Abbot)
on Sep 26, 2011 at 12:36 UTC ( #927849=note: print w/ replies, xml ) Need Help??


in reply to Plack and mod_fcgid

You are probably missing a SetHandler directive.   Look at the second example in the Apache documentation for mod_fcgid carefully.

I am more familiar with mod_fcgi but I expect that the situation will be similar...

There are really two ways that Apache is designed to operate:   (1) for shared-hosting companies; and (2) for dedicated corporate servers.   In the first scenario, “anyone out there” could request to run “a CGI program” ... except that we want it to run under fast-CGI.   As long as the SetHandler fcgid-script directive or the SetHandler directive is used appropriately, the Apache module tries to do all the rest.   It “runs the file,” just as CGI does, but it (so to speak...) tries to harbor them for a while.

Another way to do FastCGI (as I use mod_fastcgi) is to establish a static or dynamic server and then to cause the <Location> directive to refer to it.   This is the second scenario I described.   In this case, Apache isn’t looking for “a file to run.”   Instead, the server processes are running (under Apache’s auspices or not... on the current machine or not...) and Apache is forwarding selected requests to them.   In this scenario, the identity and the number of handlers is well-known to you and stable (whereas, in the first, it could be so-to-speak unpredictable).

Throughout all of this, the Plack portion of it all is relatively easy:   it’s basically app.psgi.

I have very-recent experience with a FastCGI deployment and would be happy to help further, if this initial, admittedly-vague response to this thread has been useful for setting the stage ...


Comment on Re: Plack and mod_fcgid
Re^2: Plack and mod_fcgid
by morgon (Deacon) on Sep 26, 2011 at 16:52 UTC
    Thanks for your reply.

    I have also tried:

    <Location "/foo"> FcgidWrapper "<path to script-dir>/app.psgi" .psgi virtual AddHandler fcgi-script .psgi </Location>
    But that does not change a thing...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927849]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2014-12-28 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls