Thanks, updated cookbook.
http://github.com/kraih/mojo/commit/0652724e4ffc294541691121fe9d9dbaeddf7c0e
--
Sebastian Riedel
http://labs.kraih.com
http://mojolicious.org
http://twitter.com/kraih
Well, with Plack/PSGI and FCGI :
$ mojolicious generate lite_app
$ plackup -s FCGI --listen /tmp/fcgi.sock --daemonize ./myapp.pl
$ cat >> lighttpd.conf
server.document-root = var.CWD
server.port = 1234
server.modules = ( "mod_fastcgi" )
fastcgi.server = ( "/" =>
((
"socket" => "/tmp/fcgi.sock",
"check-local" => "disable",
"fix-root-scriptname" => "enable"
))
)
$ lighttpd -f ./lighttpd.conf
$ GET http://localhost:1234
<!doctype html><html>
<head><title>Funky!</title></head>
<body>Yea baby!
</body>
</html>
-Brian
There is a more direct way, every Mojolicious application *is* a FastCGI script out of the box.
It just seems nobody has an example configuration for that, which is no big surprise considering how unpopular Lighttpd has become.
That would be a big surprise, it is most likely a server constraint.
Why has this happened?
Lyle
Memory leaks and other bugs that have not been fixed in years.
Here's one :
server.document-root = var.CWD
server.port = 1234
server.modules = ( "mod_fastcgi" )
fastcgi.server = ( "/" =>
((
"port" => "1235",
"bin-path" => "myapp.pl fastcgi",
"check-local" => "disable",
"fix-root-scriptname" => "enable"
))
)
But, this only seems to work with "lighttpd -D -f lighttpd.conf".
When I omit "-D' (and a server.errorlog =..) I get
2010-07-17 09:36:47: (mod_fastcgi.c.1108) child exited with status 2 myapp.pl fastcgi
Brian
Yay! :)