Deploying Catalyst Applications
Before you go automatically searching for the Apache section, stop and think: do you have a specific reason to use Apache? If not, then you might be much better off using nginx or lighttpd. They are easier to configure, faster, and consume less resources.
Here is the CPAN documentation on deployment. It talks about mod_perl vs. FastCGI, and standalone/external FastCGI mode, which is regarded as the most flexible deployment option.
Deployment without a web server
Catalyst comes with a built-in HTTP server for standalone deployment, myapp_server.pl. That server can use various engines, of which Catalyst::Engine::HTTP::Prefork is a high-performance pre-forking Catalyst engine and recommended. To serve your application with HTTP::Prefork, run:
CATALYST_ENGINE='HTTP::Prefork' script/mojomojo_server.pl
Init.d script for the standalone server
nginx
The nginx web server leads lighttpd in terms of popularity and better resource utilization, according to WikiVS.
lighttpd
The lighttpd web server is lighter, simpler and considerably faster than Apache. If you don't have a specific reason to use Apache, lighttpd will probably do the job with less headache and overhead.
- Deploying Catalyst apps with lighttpd and FastCGI - most comprehensive and up-to-date. Includes start/stop scripts.
- Quick and dirty FastCGI - A quick and dirty FastCGI configuration using
lighttpd, for isolating performance and other problems
Apache
Apache is the heavyweight of web servers. If you don't have a specific reason to use it, consider nginx. If you choose Apache, the next choice is mod_perl vs FastCGI.
FastCGI
- See also the Managing FastCGI Processes section below
- Deploying Catalyst apps with Apache and FastCGI
- Deploying Catalyst apps with Apache and FastCGI on MS Windows
Reverse Proxy
mod_perl
- Running under Apache/mod_perl - Catalyst Advent Calendar 2007
- mod_perl Deployment - Catalyst Advent Calendar 2007
- See PerlOptions +Parent for running multiple instances of catalyst with mod perl - Needs to be tested
perlbal/plack/psgi
Example deployment using perl-based futuristical applications. Can handle large-scale production websites with load balancing, HA and infinite capabilities for customization and optimization.
Microsoft Internet Information Service - IIS
It is possible to run Catalyst under IIS with FastCGI, but only on IIS 6.0 (Microsoft Windows 2003), IIS 7.0 (Microsoft Windows 2008 and Vista) and hopefully its successors.
- Catalyst apps with IIS 6.0 and FastCGI on MS Windows 2003
- Catalyst apps with IIS 7.0 and FastCGI on MS Windows 2008/Vista
NOTE: Do not waste your time to get Catalyst App running as FastCGI on IIS 5.0 (Windows 2000) or IIS 5.1 (Windows XP) it simply is not possible despite the declared FastCGI support.
LiteSpeed
Installing LiteSpeed and FastCGI for Catalyst
PAR deployment
- Building PAR Packages - Catalyst Advent Calendar 2005
- PAR Deployments with Apache and FastCGI
Managing FastCGI Processes
- Using Daemontools: FastCGI Deployment with Bells On - Catalyst Advent Calendar 2006
- A complex, somewhat Debianish init script
- A simple init script: FastCGI, second visit - Catalyst Advent Calendar 2006
- Another simple init script can be found in the lighty/fastcgi deployment docs
- Handling growing FastCGI processes - Catalyst Advent Calendar 2007
Deployment on shared hosting
- local::lib and Catalyst
- Catalyst on shared hosting:
Showing changes from previous revision. Removed | Added

