Table of Contents

Catalyst/Perl and LiteSpeed How-To

This guide is based the on a Catalyst how-to written by Conundrum at http://www.dev411.com/wiki/Installing_LiteSpeed_and_FastCGI_for_Catalyst.

Make sure you have LiteSpeed Web Server installed.

Configuring LiteSpeed

Login to LiteSpeed Web Admin.

Configure Virtual Host

Create Catalyst FastCGI "External App"

Name: MyApp
Address: UDS://tmp/myapp.sock
Initial Request Timeout: 60
Retry Timeout: 0
Memory Soft Limit: 80M
Memory Hard Limit: 100M
Process Soft Limit: 200
Process Hard Limit: 200

To use TCP, use the something like the following for 'Address':

Address: 10.0.0.2:1030

Make sure the FastCGI server is running on the port you select with something like either of the following depending on whether you're using sockets or TCP:

MyApp/script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5 -d
MyApp/script/myapp_fastcgi.pl -l 1030 -n 5 -d

NOTE: From LiteSpeed staff: When an application's internal process manager is prefered, you can still let LiteSpeed start the parent process automatically, in that case, just set “instances” to “1”, and set the command line parameter '-n' to match “Max Connections” and get rid of “-d” option.] This will be incorporated after it has been tested.

Create Catalyst FastCGI App "Context"

Now that the FastCGI app is configured, we need to let LiteSpeed know what URLs will bind to the Catalyst FCGI app. This is done by setting a LiteSpeed “Context”.

Restart LiteSpeed

Gracefully restart LiteSpeed via web admin or commandline:

/mylswsinstall/bin/lswsctrl restart