Apache-2.2

帶有 Apache 2.2 的 WebDav - 根本行不通

  • January 14, 2016

我配置了一個 WebDav 目錄,但它不起作用。這是我的配置:

# Load WebDav Modules
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so

# DavLock File
DavLockDB /tmp/DavLock

# http://www.webdav.org/mod_dav/install.html
DAVMinTimeout 600

# Some WebDav Fixes
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
BrowserMatch "Microsoft-WebDAV-MiniRedir/6.1.7600" redirect-carefully
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On

<Directory /var/www/testdav>
Dav On
</Directory>

模組被載入:

WebServer> ./httpd -M
Loaded Modules:
...
dav_module (shared)
dav_fs_module (shared)
...
Syntax OK

DavLock 是可寫的:

WebServer> ll /tmp/DavLock
-rwxrwxrwx 1 nobody users 0 Feb 13 20:14 /tmp/DavLock

這是我的測試伺服器令牌:

Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c-fips PHP/5.3.15 DAV/2 

我在錯誤日誌中找不到任何有用的資訊。也許有人可以指出我正確的方向。

謝謝從頭開始

編輯#1

使用 Windows 測試失敗並顯示以下消息:

192.168.1.100 - - [13/Feb/2013:21:19:18 +0100] "OPTIONS /testdav/ HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"
192.168.1.100 - - [13/Feb/2013:21:19:18 +0100] "PROPFIND /testdav HTTP/1.1" 301 364 "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"
192.168.1.100 - - [13/Feb/2013:21:19:18 +0100] "PROPFIND /testdav/ HTTP/1.1" 405 362 "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"

使用 DAV Explorer 進行測試失敗並顯示以下消息:

192.168.1.100 - - [13/Feb/2013:21:20:47 +0100] "OPTIONS /testdav/ HTTP/1.1" 200 - "-" "UCI DAV Explorer/0.91 RPT-HTTPClient/0.3-3E"

得到錯誤… dav 模組有問題。將其替換為以相同方式(和相同版本)安裝的另一台伺服器的模組。

嘗試查看配置文件和日誌文件之間的區別。在配置文件中:“Microsoft-WebDAV-MiniRedir/6.1.7600” 在日誌文件中:“Microsoft-WebDAV-MiniRedir/6.1.7601”

我認為你必須像這樣修補你的配置文件: BrowserMatch “^Microsoft-WebDAV-MiniRedir” redirect-carefully

引用自:https://serverfault.com/questions/478528