Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'd like to use Perl for some small and fast webapps. I don't think I need access to Apache internals, but I'm confused regarding which Apache2 FastCGI module I'm supposed to use and which Perl module (there seems to be a few alternatives) to use with it.

I found this Perl 5 wiki page, but it did not give a concrete recommendation. This one didn't mention FastCGI.

Which Apache2 module and which Perl module should I use for the most modern, maintained, and up-to-date FastCGI setup?

  • Comment on Apache and FastCGI: which Apache2 module and which Perl module should I use?

Replies are listed 'Best First'.
Re: Apache and FastCGI: which Apache2 module and which Perl module should I use?
by almut (Canon) on Jul 14, 2010 at 16:32 UTC

    In the past, I've used mod_fastcgi in combination with the Perl module FCGI, and although I remember occasionally having had minor build "issues" with mod_fastcgi (depending on the Apache version), in the end things have always worked flawlessly.

    On the Perl side, there's also CGI::Fast (which depends on FCGI), but I can't really recommend one over the other. I.e., I've used both and both worked.

    That said, if I were to start a new FastCGI web project today, I would probably choose mod_fcgid with CGI::Fast — mainly because it seems to me (just a gut feeling) that this combination - in particular the Apache module mod_fcgid - is newer and better maintained.

      Thanks. Yes, I now see that the Apache httpd page has a link to mod_fcgid right there under "Subprojects". Will use mod_fcgid.

      Incidentally, I notice that the website that appears to represent FastCGI (fastcgi.com) doesn't contain any mention of mod_fcgid on their "FastCGI Servers" page.

      Regarding CGI::Fast, I see that it itself uses the FCGI module. This is odd though: I see that CGI::Fast comes standard with Perl, ... but the FCGI module does not. Perhaps I'm supposed to install FCGI manually after installing mod_fcgid?

        Perhaps I'm supposed to install FCGI manually after installing mod_fcgid?

        Yes, you definitely need to install FCGICGI::Fast is just a thin wrapper around FCGI.

      ... I would probably choose mod_fcgid ...

      Cool! I didn't know that the Apache webserver has its own FastCGI module, I always used mod_fastcgi.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)