Thanks Gabor and Stefan.
On 11/01/2013 03:33 PM, Gabor Szabo wrote:
I might be mistaken, but as far as I understand nginx cannot run CGI scripts.
Based on your feedback, I've switched to lighttpd.
For future reference, if anyone needs to deploy Dancer with lighttpd as
CGI/FastCGI:
As CGI:
===
$HTTP["host"] =~ "^cgi\.example\.com$" {
# Default Root location - points to Dancer's public directory.
server.document-root =
"/home/gordon/projects/dancer_bootstrap_fontawesome_template/public"
# If the URL matches a typical static file extension, but goes thought
our CGI script,
# then rewrite the CGI script out of the URL, and lighttpd will serve
it directly as a static file.
url.rewrite = (
"^/dispatch.cgi/(.+\.(js|css|gif|jpg|png|ico|txt|swf|html|htm|svg))$" =>
"/$1"
)
# Default file, if the user asked for the root URL
index-file.names = ( "dispatch.cgi" )
cgi.assign = ( ".cgi" => "/usr/bin/perl" )
}
===
As FastCGI:
===
$HTTP["host"] =~ "^fastcgi\.example\.com$" {
# Default Root location - points to Dancer's public directory.
server.document-root =
"/home/gordon/projects/dancer_bootstrap_fontawesome_template/public"
# If the URL matches a typical static file extension, but goes through
our CGI script,
# then rewrite the CGI script out of the URL, and lighttpd will serve
it directly as a static file.
url.rewrite = (
"^/dispatch.fcgi/(.+\.(js|css|gif|jpg|png|ico|txt|swf|html|htm|svg))$" =>
"/$1"
)
# Default file, if the user asked for the root URL
index-file.names = ( "dispatch.fcgi" )
fastcgi.server = (
".fcgi" =>
((
"bin-path" =>
"/home/gordon/projects/dancer_bootstrap_fontawesome_template/public/dispatch.fcgi",
"socket" => "/tmp/dancer_fcgi.socket",
"check-local" => "disable",
"min-procs" => 1,
"max-procs" => 1,
"idle-timeout" => 20,
))
)
}
===
Best,
-gordon
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users