openwrt webdav安装记录

271次阅读
没有评论

放弃用Lighttpd-mod-webdav的方法,一直不成功

opkg update 
opkg install lighttpd lighttpd-mod-cgi  lighttpd-mod-alias lighttpd-mod-webdav
opkg install php7 php7-cgi --nodeps

opkg 在安装时如果报依赖错误,加--nodeps 参数可以解决

修改 /etc/lighttpd/conf.d/30-cgi.conf


\####################################################################### ## ## CGI modules ## --------------- ## ## See https://redmine.lighttpd.net/projects/lighttpd/wiki/docs_modcgi ## server.modules += ( "mod_cgi" ) ## ## Plain old CGI handling ## ## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini. # cgi.assign = ( ".php" => "/usr/bin/php-cgi", ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl", ".rb" => "/usr/bin/ruby", ".erb" => "/usr/bin/eruby", ".py" => "/usr/bin/python" ) ## ## to get the old cgi-bin behavior of apache ## ## Note: make sure that mod_alias is loaded if you uncomment the ## next line. (see modules.conf) ## #alias.url += ( "/cgi-bin" => server_root + "/cgi-bin" ) #$HTTP["url"] =~ "^/cgi-bin" { # cgi.assign = ( "" => "" ) #} ## #######################################################################

修改 /etc/lighttpd/lighttpd.conf


server.document-root = "/mnt/sda3/www" server.upload-dirs = ( "/tmp" ) server.errorlog = "/var/log/lighttpd/error.log" server.pid-file = "/var/run/lighttpd.pid" server.username = "http" server.groupname = "www-data" index-file.names = ( "index.php", "index.html", "index.htm", "default.htm", ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) ### Options that are useful but not always necessary: #server.chroot = "/" server.port = 81 #server.bind = "localhost" #server.tag = "lighttpd" #server.errorlog-use-syslog = "enable" #server.network-backend = "writev" ### Use IPv6 if available #include_shell "/usr/share/lighttpd/use-ipv6.pl" #dir-listing.encoding = "utf-8" server.dir-listing = "enable" #server.modules = ( # "mod_cgi", # "mod_webdav" #) include "/etc/lighttpd/mime.conf" include "/etc/lighttpd/conf.d/*.conf"

修改/etc/php.ini 中的
doc_root = "/mnt/sda3/www"

然后用OWNCLOUD来解决WEBDAV问题

正文完
 0
评论(没有评论)