当前位置: 首页 > 工具软件 > WebDAV CGI > 使用案例 >

openwrt下安装lighttpd/webdav模块及改变安装目录

向俊贤
2023-12-01
Openwrt下安装lighttpd及Webdav模块


安装lightttpd
1.opkg update
2.opkg install lighttpd(依赖libxml库)
3.修改/etc/lighttpd/lighttpd.conf
  a.把    static-file.exclude-extensions = (".php", ".pl", ".fcgi")
    改成:static-file.exclude-extensions = (".php", ".pl", ".fcgi", ".lua")
  b.在文件的最后面加上:
    $SERVER[] == ":80" {
     server.document-root = "/www/"
     cgi.assign = ( "luci" => "/usr/bin/lua")
    }
  c.将server.modules段改成:
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
# "mod_auth",
# "mod_status",
# "mad_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
"mod_cgi"
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_webdav"
)
5.编辑/www/index.html
把 /cgi-bin/luci
改成 /cgi-bin/luci.lua


6. /etc/init.d/uhttpd stop
   /etc/init.d/uhttpd disable
   /etc/init.d/lighttpd enable
   /etc/init.d/lighttpd start


安装Webdav模块
1.修改 etc/lighttpd/lighttpd.conf,c.将server.modules段改成:
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
# "mod_auth",
# "mod_status",
# "mad_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
"mod_cgi",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
"mod_webdav"
)
2.opkg update
3.opkg install lighttpd-mod-webdav
4./etc/init.d/lighttpd reload


opkg安装包位置重定向
1.新疆目标目录
     mkdir /mnt/sda1/packages/ (如果目录在U盘上,那将直接安装到U盘) 
2.修改opkg的配置文件
     echo dest usb /mnt/sda1/packages/ >> /etc/opkg.conf
3.下载包到重定向位置
     opkg --dest usb install python
4.构建系统环境
     ln -s /mnt/sda1/packages/usr/bin/python /usr/bin/python
  
 类似资料: