1. Apache WebDAV 设置 (httpd.conf)
WAMP
C:\wamp64\bin\apache\apache2.4.23\conf\httpd.conf
XAMPP
C:\xampp\apache\conf\httpd.conf
要将前面的 # 拿掉
LoadModule alias_module modules/mod_alias.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule setenvif_module modules/mod_setenvif.so
Include conf/extra/httpd-dav.conf
2. 创建 admin 用户与密码 (user.passwd)
WAMP
> cd "C:\wamp64\bin\apache\apache2.4.23\bin"
> htdigest -c "C:\wamp64\bin\apache\apache2.4.23\user.passwd" DAV-upload admin
XAMPP
> cd "C:\xampp\apache\bin"
> htdigest -c "C:\xampp\apache\user.passwd" DAV-upload admin
3. 配置 WebDAV 文件夹 (httpd-dav.conf)
WAMP
C:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-dav.conf
XAMPP
C:\xampp\apache\conf\extra\httpd-dav.conf
如果是 XAMPP, 将以下路径改去 C:/xampp/apache
DavLockDB "C:/wamp64/bin/apache/apache2.4.23/DavLock"
Alias /sites "C:/wamp64/bin/apache/apache2.4.23/sites"
<Directory "C:/wamp64/bin/apache/apache2.4.23/sites">
Dav On
Order Allow,Deny
Allow from all
AuthType Digest
AuthName DAV-upload
Options Indexes
AuthUserFile "C:/wamp64/bin/apache/apache2.4.23/user.passwd"
AuthDigestProvider file
# Allow universal read-access, but writes are restricted
# to the admin user.
<LimitExcept GET OPTIONS>
require user admin
</LimitExcept>
</Directory>
准备 DavLock 和 sites 两个文件夹
4. 重启 Apache
http://127.0.0.1/sites
5. 使用 WebDAV 客户端连接以上服务
WinSCP
https://winscp.net/eng/download.php
BitKinex
http://www.bitkinex.com/
没有评论:
发表评论