CentOS 7 架設 WebDAV注意事項
架設過程主要參照這篇文章:How to Set up WebDAV with Apache on CentOS 7
由於我只是在區網下架設,所以不進行認證,因此conf檔改成以下形式:
DavLockDB /var/www/html/DavLock
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/webdav/
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
Alias /webdav /var/www/html/webdav
<Directory /var/www/html/webdav>
DAV On
Order allow,deny
Allow from all
AuthType None
Require all granted
Satisfy Any
</Directory>
</VirtualHost>
但這樣Client端會無法寫入檔案,此時在 /var/log/httpd/error.log 下會出現以下錯誤訊息:
The locks could not be queried for verification against a possible "If:" header.
Could not open the lock database.
(13)Permission denied: Could not open property database.
這是由於apache沒有寫入 /var/www/html/DavLock的權限,將DB的路徑改到其他有存取權限的地方,或是修改 /var/www/html/ 目錄的owner即可正常使用。
頁:
[1]