Project

General

Profile

Actions

FastCGI on lighttpd

openSUSE configuration

<!-- -->

fastcgi.server += ("/helloworld" =>
                   ("helloworld" =>
                     ("socket" => "/usr/wt/socket",
                      "bin-path" => "/srv/www/cgi-bin/helloworld.fcgi",
                      "max-procs" => 1,
                      "check-local" => "disable",
                      "bin-environment" => ("FOO" => "bar")
                     )
                    )
                )
  • in /etc/lighttpd/modules.conf
    enable the following (existing) section

<!-- -->

##
## FastCGI (mod_fastcgi)
##
include "conf.d/fastcgi.conf"

append an include line at the end of the modules.conf file

include "conf.d/helloworld.conf"
  • When done you can access the application on htpp://your.server/helloworld

Flat File Configuration

If you have a single configuration file, add such a section

server.modules += ( "mod_fastcgi" )
fastcgi.server += ("/helloworld" =>
                   ("helloworld" =>
                     ("socket" => "/usr/wt/socket",
                      "bin-path" => "/srv/www/cgi-bin/helloworld.fcgi",
                      "max-procs" => 1,
                      "check-local" => "disable",
                      "bin-environment" => ("FOO" => "bar")
                     )
                    )
                )
  • When done you can access the application on htpp://your.server/helloworld

/usr/wt

The FastCGI socket has been put into /usr/wt/socket because the default Wt build does put its own session server sockets as $prefix/wt/run/server-$X. There is no requirement to let the lighttpd precreate FastCGI Wt servers to handle different connections as Wt will schedule server creation and session scheduling internally. The internal creation of session servers is not logged to httpd log (where it should be).

Updated by Peter Mortensen over 13 years ago ยท 8 revisions