openwrt中uhttpd替换成lighttpd

openwrt 中 附带的http Server是比较多的,uhttpd本身是不支持php功能的,如果要使用php功能可以选择lighttpd。
而选择lighttpd后对原来的luci支持不太好,这里对lighttpd配置做了一点修改,可以实现对luci的支持。

1. 配置编译openwrt:
make menuconfig
NetWork --->
Web Servers/Proxies--->
<*> lighttpd --->
<*> lighttpd-mod-cgi
Luci--->
Themes ---> 
<*> luci-theme-openwrt
Translations --->
<*> luci-i18n-english
<*> luci-i18n-chinese
<*> luci-i18n-german
make V=99 -j8


2. 修改lighttpd.conf
  a.  server.modules= ("mod_cgi", ...)
b.  static-file.exclude-extensions= (".lua", ...)
c.  cgi.assign = ( ".lua"=>"/usr/bin/lua",...)

3.    修改/www/index.html中URL=/cgi-bin/luci 为URL=/cgi-bin/luci.lua
4 .   将/www/cgi-bin/luci文件改名为/www/cgi-bin/luci.lua或使用链接,如下:
ln -s /www/cgi-bin/luci /www/cgi-bin/luci.lua
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值