分享

Lighttpd + mod_cgi + python+Perl简单配置

 python_diango 2012-10-09
Lighttpd + mod_cgi + python+Perl简单配置
十一月 8, 2010 by 
Filed under: Lighttpd  290 浏览数

一、安装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"; 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多