Here's what I put in my lighttpd.conf:
$HTTP["url"] =~ "^/hello.fcgi" {
fastcgi.server += ( ".fcgi" => (
"hello" => (
"socket" => "/tmp/hello-fcgi.socket",
"bin-path" => "/var/www/hello.fcgi",
"max-procs" => 1,
"bin-environment" => (
"PERL5OPT" => "-d:NYTProf",
"NYTPROF" => "addpid=1:trace=2:file=/tmp/nytprof.out:",
),
)
) )
}
The relevant parts are:
"bin-environment" => ( "PERL5OPT" => "-d:NYTProf", "NYTPROF" => "addpid=1:trace=2:file=/tmp/nytprof.out:", ),Thanks to this use.perl.org post for the tip to include the trailing colon in NYTPROF.