设为首页 收藏本站
查看: 567|回复: 0

[经验分享] Apache——Config WebDAV

[复制链接]

尚未签到

发表于 2015-8-4 10:42:52 | 显示全部楼层 |阅读模式
  
我需要在Apache上配置WebDAV,阅读了Apache的官方文档,查找了多方资料,花费了我好几个小时终于配置成功了,将配置过程记录为下面的文字。

Enviroment

Web Server: Windows XP Professional Service Pack2 , Apache 2.2
Client: Windows XP Professional Service Pack2 ,IE6

Config File
需要注意的部分我用红色突出显示。

-------------httpd.conf------------------------
#...
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
#...
# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf
#...

------------httpd-dav.conf--------------------------
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_dav, mod_dav_fs, mod_setenvif, mod_alias
#                   mod_auth_digest, mod_authn_file
#
  # The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.
  DavLockDB "D:/Apache Software Foundation/Apache2.2/DAVLock"
  Alias /load "D:/Apache Software Foundation/Apache2.2/load"
  
    Dav On
  Order Allow,Deny
    Allow from all
  AuthType Basic
    AuthName load
    # You can use the htdigest program to create the password database
    AuthUserFile "D:/Apache Software Foundation/Apache2.2/DavPwd/user.pwd"
  #Allow universal read-access, but writes are restricted
    # to the admin user.
    # The LimitExcept must have PROPFIND privilege
   
        #The username format should be usename@YourDomain
        require user dav@MyDomain.com
   

  #
# The following directives disable redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a
# problem with several clients that do not appropriately handle
# redirects for folders with DAV methods.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

Create Password Database
  Use htpasswd.exe to create the password database,it's a file which AuthUserFile refer to.由于我使用的是Basic认证,所以使用bin目录下的htpasswd.exe 去生成上面配置文件中AuthUserFile 所指的那个文件:user.pwd。如果使用摘要认证的话,则使用htdigest.exe,两者的语法是类似的。这里我使用这样的命令(I execute the command like this):
htpasswd.exe -c "D:/Apache Software Foundation/Apache2.2/DavPwd/user.pwd" dav@MyDomain.com
回车后,会提示让你输入两次密码。

Config WebDAV Client
  Windows XP对WebDAV支持得比较好,我们可以使用其网上邻居或者映射网络磁盘的方式连接到WebDAV Server,还可以使用IE连接。我在IE中使用“打开Web Folder”的方式打开“http://localhost/load”所指的WebDAV文件夹。
  Postscript
需要补充说明的是,有些资料说在XP上需要使用“地址+端口号”或者“地址+#”的方式打开WebDAV文件夹,因为Windows2000和WindowsXP的WebDAV Driver的版本是不同的。

  
  Reference
http://www.webdav.org/mod_dav/
http://www.webdav.org/mod_dav/faq/#00-00
http://www.thrrrust.com/~pclark/blog/2005/03/fun-with-windows-xp-and-webdav.html
http://www.debian-administration.org/articles/279
http://ulihansen.kicks-ass.net/aero/webdav/

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-93995-1-1.html 上篇帖子: 项目管理工具Redmine + SubVersion + Apache + windows环境安装搭建 下篇帖子: 在Netty中使用Apache common fileupload
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表