Setting Up WebDAV

Issues related to applications and software problems
Post Reply
kbocek
Posts: 242
Joined: 2005/05/30 15:40:15
Location: Benicia CA, USA

Setting Up WebDAV

Post by kbocek » 2017/06/27 15:54:12

I'm following a couple of pages on setting up WebDAV:

https://devops.profitbricks.com/tutoria ... -centos-7/
https://www.vultr.com/docs/how-to-setup ... n-centos-7

But when I try to access the page I get "Not Found"

The webdav modules are loaded:

Code: Select all

$httpd -M |grep dav
 dav_module (shared)
 dav_fs_module (shared)
 dav_lock_module (shared)
I've setup the directory for WebDAV *outside* the normal httpd document root:

Code: Select all

davLockDB /mnt/area1/webdav/DavLock
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot "/mnt/area1/webdav"
        ErrorLog /var/log/httpd/error_log
        CustomLog /var/log/httpd/access_log combined
        Alias /webdav /mnt/area1/webdav/
        <Directory /mnt/area1/webdav>
                DAV On
                AuthType Basic
                AuthName "webdav"
                AuthUserFile /mnt/area1/webdav/.htpasswd
                Require valid-user
        </Directory>
</VirtualHost>
Does anyone have any thoughts on what I'm missing?

kbocek
Posts: 242
Joined: 2005/05/30 15:40:15
Location: Benicia CA, USA

Re: Setting Up WebDAV

Post by kbocek » 2017/06/27 17:12:22

A comment in the module documentation:

https://httpd.apache.org/docs/2.4/mod/mod_dav.html

Talks about getting the selinux context correct:
If you are using a system with SELinux enabled, the DAV directory tree needs a file context that allows the Apache user to write to the directory; such as httpd_sys_rw_content_t or httpd_user_rw_content_t. And the DavLockDB directory needs the httpd_var_lib_t file context.
I've done this but still get the 404.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Setting Up WebDAV

Post by TrevorH » 2017/06/27 17:19:40

404 is page not found. An selinux problem would result in permission denied.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply