标题:Lighttpd + mod_cgi + python+Perl简单配置 出处:运维进行时 时间:Tue, 21 Aug 2007 23:10:32 +0000 作者:root 地址:https://blog.liuts.com/post/56/ 内容: 一、安装Lighttpd配置 二、vi /usr/local/lighttpd/etc/lighttpd.conf 1、"mod_cgi",去掉前面的# 引用 2、index-file.names = ( "index.php", "index.html","index.htm", "default.htm" ,"index.cgi","index.pl","index.py")添加默认首页。 3、static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ,"cgi","py") 4、cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" , ".py" => "/usr/bin/python" , ) 三、测试: vi /www/index.py #!/usr/bin/python print "hello world" vi /www/cgi-bin/index.cgi #!/usr/bin/perl print "Content-type: text/html\n\n"; print "hello world"; 四、访问http://localhost/index.py、http://localhost/index.cgi Generated by Bo-blog 2.1.1 Release