Re: perl lighttpd.conf
Matthew Weigel <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Andrew Vonderwueste wrote: > I am new to fastcgi and lighttpd and am unable to find a good example of > a lighttpd.conf file set up for multiple perl fcgi scripts. > > My current test setup is: > > fastcgi.server = ( "..fcgi" => > > (( "socket" => "/tmp/application.fcgi.socket", > "bin-path" => "/var/www/html/site1/fcgi/script1.fcgi", > )) > ) > > Adding another script or two must be simple, but I have been unable to > get it right. Any help would be greatly appreciated. Thanks. First... I assume the "..fcgi" is a typo in copying your config? After that, it looks like the problem you might be having is that all .fcgi requests get sent to script1.fcgi; the way you've configured lighttpd, all GET requests that end in ".fcgi" are being routed to the FastCGI started from the bin-path there. PHP handles this in a very different manner, which might be what you're expecting: the PHP interpreter itself speaks FastCGI and executes the scripts without anything in the script knowing the difference. An individual Perl script can speak FastCGI, but the perl binary itself doesn't run as a daemon serving requests. So, each fastcgi.server that you specify has to correspond to an individual Perl script acting as a FastCGI server, and you're better off partitioning part of the URL namespace (like http://www.example.com/application1/ and everything under it) for each script that runs. Hope that helps! -- Matthew Weigel hacker unique & idempot . ent