1、安裝apache
yum install httpd* -y
2、配置webdav
vim /etc/httpd/conf/httpd.conf
在最後添加
Include conf/webdav.conf #指定webdav的配置文件路徑
3、創建webdav配置文件
vim /etc/httpd/conf/webdav.conf
增加下列內容
<IfModule mod_dav.c>
LimitXMLRequestBody 131072
Alias /webdav "/var/www/webdav"
<Directory /var/www/webdav>
Dav On
Options +Indexes
IndexOptions FancyIndexing
AddDefaultCharset UTF-8
AuthType Basic
AuthName "WebDAV Server"
AuthUserFile /etc/httpd/webdav.users.pwd
Require valid-user
Order allow,deny
Allow from all
</Directory>
</IfModule>
4、創建訪問目錄
mkdir -p /var/www/webdav
chown apache:apache /var/www/webdav
5、添加用戶設定密碼
htpasswd -c /etc/httpd/webdav.users.pwd user01
(htpasswd -D /etc/httpd/webdav.users.pwd user01 #刪除用戶)
6、重啓apache服務即可訪問
service httpd restart
訪問webdav方式:
瀏覽器訪問http://ip/webdav,如果提示輸入賬號密碼即成功,賬號密碼爲之前創建用戶的密碼
有些無法用瀏覽器訪問,需要安裝客戶端,例如bitkinex323,下載如下:
BitKinex 3.2.3 for Windows XP, Vista, Windows 7 (freeware, 8.1 MB)