一、修改下面3個配置檔案後,重新啟動apache伺服器,就可以在Windows通過“映射網絡驅動器”登陸了。
1. 去掉下面3行配置的注釋
=========================
httpd.conf
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
# Distributed authoring and versioning (WebDAV)
# Attention! WEB_DAV is a security risk without a new userspecific configuration for a secure authentifcation
Include "conf/extra/httpd-dav.conf"
2. 删除下面的行,或者配置相應的通路規則
extra/httpd-xampp.conf
#
# New XAMPP security concept
# Close XAMPP security section here
<LocationMatch "^/(?i:(?:security))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
3. 在<LimitExcept GET OPTIONS>加上PROPFIND,如下:
extra/httpd-dav.conf
<Directory "C:/xampp/webdav">
Dav On
Order Allow,Deny
Allow from all
AuthType Digest
AuthName "XAMPP with WebDAV"
# You can use the htdigest program to create the password database:
# htdigest.exe -c "\xampp\security\webdav.htpasswd" "XAMPP with WebDAV" wampp
AuthUserFile "C:/xampp/security/webdav.htpasswd"
AuthDigestProvider file
# Allow universal read-access, but writes are restricted
# to the admin user.
<LimitExcept GET PROPFIND OPTIONS>
require valid-user
</LimitExcept>
</Directory>
二、建立使用者
預設使用者:xampp-dav-unsecure
預設密碼:ppmax2011
建立新使用者指令:
htdigest.exe -c "c:\xampp\security\webdav.htpasswd" "XAMPP with WebDAV" username
三、進一步可以通過編輯httpd-dav.conf配置檔案進行權限設定
本文轉自 h2appy 51CTO部落格,原文連結:http://blog.51cto.com/h2appy/773340,如需轉載請自行聯系原作者