Apache httpd : Configure WebDAV2021/11/15 |
Configure WebDAV Folder.
|
|
[1] | |
[2] | For example, Create a directory [/home/webdav] and it makes possible to connect to WebDAV folder only by HTTPS. |
[root@www ~]# mkdir /home/webdav [root@www ~]# chown apache. /home/webdav [root@www ~]# chmod 770 /home/webdav
[root@www ~]#
vi /etc/httpd/conf.d/webdav.conf # create new Alias /webdav /home/webdav <Location /webdav> DAV On SSLRequireSSL Options +Indexes AuthType Basic AuthName WebDAV AuthUserFile /etc/httpd/conf/.htpasswd <RequireAny> Require method GET POST OPTIONS Require valid-user </RequireAny> </Location> # add a user : create a new file with [-c] [root@www ~]# htpasswd -c /etc/httpd/conf/.htpasswd fedora New password: # set password Re-type new password: Adding password for user fedora [root@www ~]# systemctl restart httpd |
[3] | If SELinux is enabled, add rules to allow accesses to target WebDAV directory. |
[root@www ~]# chcon -R -t httpd_sys_rw_content_t /home/webdav [root@www ~]# semanage fcontext -a -t httpd_sys_rw_content_t /home/webdav |
[4] |
Configure WebDAV client on client computer. This example is on Windows 11.
Open [PC] and Click [Add a network location] icon on the upper-menu.
|
[5] | Click [Next] button. |
[6] | Click [Next] button. |
[7] | Input the URL of WebDav folder. |
[8] | Authentication is required, input username and password you added in section [1] by [htpasswd]. |
[9] | Input WebDav Folder Name. Any name is OK, it's used on your Windows Computer. |
[10] | Click [Finish] button. |
[11] | Just accessed to WebDav Folder. |
Sponsored Link |
|