SLES 15
Sponsored Link

Apache2 : WebDAV Setting
2019/01/25
 
Configure Apache2 to use WebDAV.
[1]
[2] For example, Make a directory [webdav] and it makes possible to connect to WebDAV directory only by SSL.
www:~ #
a2enmod dav

www:~ #
a2enmod dav_fs

www:~ #
a2enmod dav_lock

www:~ #
mkdir /home/webdav

www:~ #
chown wwwrun. /home/webdav

www:~ #
chmod 770 /home/webdav

www:~ #
vi /etc/apache2/conf.d/webdav.conf
# create new

DavLockDB "/tmp/DavLock"
Alias /webdav /home/webdav
<Location /webdav>
    DAV On
    SSLRequireSSL
    Options None
    AuthType Basic
    AuthName WebDAV
    AuthUserFile /etc/apache2/.htpasswd
    <RequireAny>
        Require method GET POST OPTIONS
        Require valid-user
    </RequireAny>
</Location>

# add a user : create a new file with "-c" ("-c" is needed only for the initial regist)

www:~ #
htpasswd2 -c /etc/apache2/.htpasswd suse

New password:    
# set password

Re-type new password:    
# confirm

Adding password for user suse
www:~ #
systemctl restart apache2

[3]
Configure WebDAV client on client computer. This example is for the case on Windows 10.
Open [PC] and move to [Computer] tab and Click [Add a network location] icon.
[4] Click [Next] button.
[5] Click [Next] button.
[6] Input the URL of WebDav folder.
[7] Authentication is required, input username and password you added in section [1] by htpasswd.
[8] Input WebDav Folder Name. Any name is OK, it's used on your Windows Computer.
[9] Click [Finish] button.
[10] Just accessed to WebDav Folder.
Matched Content
 
Tweet