The FastCGI Protocol Driver is a C++ class library that manages all communication between a web server and a FastCGI user application. The code is highly portable and documented pretty well in the paper FastCGI -- The Forgotten Treasure. The most current version is available for download at fastcgi-HEAD.tar.gz and the source code can also be browsed on-line at the git repository.
Check the settings in "Makefile", adapt them to your system, and run "make". The result will be two examples program that are going to be called test.fcgi'' and ``echo.fcgi.
Install the test.fcgi and echo.fcgi programs to <ServerRoot>/fcgi-bin/. Then modify httpd.conf to load mod_fastcgi:
LoadModule fastcgi_module libexec/mod_fastcgi.so AddModule mod_fastcgi.cEnable access to FastCGI in Apache:
Alias /fcgi-bin/ "/usr/local/apache/fcgi-bin/" <Directory "/usr/local/apache/fcgi-bin/> SetHandler fastcgi-script </Directory> FastCGIServer fcgi-bin/test.fcgiGo to http://localhost/fcgi-bin/test.fcgi and watch Apache's access log. If nothing shows up there, try the error log.
Install the test.fcgi and echo.fcgi programs to <ServerRoot>/fcgi-bin/. Then modify lighttpd.conf to spawn the processes on demand:
fastcgi.server = ( "test.fcgi" => ( "localhost" => ( "socket" => "/var/run/lighttpd-test-fastcgi.socket" , "bin-path" => "<ServerRoot>/fcgi-bin/test.fcgi" , "check-local" => "disable" , "min-procs" => 1 , "max-procs" => 3 ) ) , "echo.fcgi" => ( "localhost" => ( "socket" => "/var/run/lighttpd-echo-fastcgi.socket" , "bin-path" => "<ServerRoot>/fcgi-bin/echo.fcgi" , "check-local" => "disable" , "min-procs" => 1 , "max-procs" => 3 ) ) )Go to http://localhost/test.fcgi and watch lighttpd's access log. If nothing shows up there, try the error log.
Copyright (c) 2001-2008 by Peter Simons <simons@cryp.to>.
The FastCGI Protocol Driver is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Copying and distribution of this software, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.