Actions
Mod cgi » History » Revision 4
« Previous |
Revision 4/32
(diff)
| Next »
Anonymous, 2007-02-25 22:05
{{{
#!rst
===
CGI
===
---------------
Module: mod_cgi
---------------
.. meta::
:keywords: lighttpd, cgi
.. contents:: Table of Contents
Description ===========
CGI programs allow you to enhance the functionality of the server in a very
straight and simple way..
Options =======
cgi.assign
file-extensions that are handled by a CGI program
e.g.: ::
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" )
For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
To get the old cgi-bin behavior of apache:
::
#Note: make sure that mod_alias is loaded if you use this:
alias.url += ( "/cgi-bin" => server_root + "/cgi-bin" )
$HTTP["url"] =~ "^/cgi-bin" {
cgi.assign = ( "" => "" )
}
Examples ========
To setup an executable which can run on its own (e.g. binaries, scripts
with a shebang line) you just don't specify a handler for the extension: ::
cgi.assign = ( ".sh" => "" )
If the file has no extension keep in mind that lighttpd matches not the
extension itself but the right part of the URL: ::
cgi.assign = ( "/testfile" => "" )
}}}
Updated by Anonymous almost 18 years ago · 4 revisions