Lighttpd + mod_cgi + python+Perl简单配置
一、安装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
vi /www/cgi-bin/index.cgi
四、访问http://localhost/index.py、http://localhost/index.cgi
二、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
vi /www/cgi-bin/index.cgi
四、访问http://localhost/index.py、http://localhost/index.cgi