官术网_书友最值得收藏!

  • Lighttpd
  • Andre Bogus
  • 123字
  • 2021-08-25 18:06:22

CGI with mod_cgi

To enable CGI in Lighttpd, we need to include and configure the module. For example, we might want to execute all files with the cgi extension:

server.modules += ("mod_cgi")
cgi.assign = (".cgi" => "")

The "" in cgi.assign means that CGI scripts are started in their own shell. Otherwise, this entry would contain the path to the CGI interpreter/application.

We probably want to add index.cgi to the list of index files:

server.indexfiles = ("index.cgi", "index.html")

Alternatively, we might prefer putting all CGI programs in one directory instead of distinguishing them by extension:

cgi.assign = ("/cgi-bin/" => "") # Patterns starting with "/" match the path.

If the CGI protocol is very simple, why should the configuration be any more complex?

主站蜘蛛池模板: 陈巴尔虎旗| 县级市| 大邑县| 巴林左旗| 商都县| 美姑县| 威海市| 绥滨县| 和龙市| 东丽区| 甘孜县| 饶河县| 宜章县| 景东| 毕节市| 社会| 忻城县| 连平县| 阜新市| 宜良县| 含山县| 松潘县| 博野县| 保康县| 美姑县| 布尔津县| 扬中市| 汕尾市| 银川市| 泊头市| 田东县| 平罗县| 宁陕县| 马公市| 中卫市| 盈江县| 志丹县| 米脂县| 凭祥市| 招远市| 龙山县|