forked from mojolicious/mojo
-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying on Lighttpd with FastCGI
mattadams edited this page Mar 3, 2011
·
1 revision
While lighttpd may not be in vogue (yes, there are documented memory leak problems - although I've never run into them myself) it is fairly straight forward to wire it up to serve a Mojolicious app.
First, make sure that script/my_app has the permissions 755. Out-of-the-box it seems to have 744, or at least that was the way I found it when I looked.
Secondly, enable FastCGI in lighttpd and insert the following rules (assuming you want lighttpd to manage the FastCGI process for you - I find this handy):
$HTTP["host"] == "yourhost.com" {
fastcgi.server = ("/" => ((
"bin-path" => "/path/to/script/my_app fastcgi",
"check-local" => "disable",
"fix-root-scriptname" => "enable",
"port" => 1027))
)
}
Obviously you will need to adjust yourhost.com, /path/to and perhaps the port number.