Configure the WebDAV server on Apache
WebDAV allows applications to directly write files to the Web Server, lock files during file writing, unlock files after writing, and support file version control. Based on WebDAV, You can implement a powerful content management system or configuration management system. Currently, mainstream WEB servers generally support WebDAV. The following describes the configuration of WebDAV on the APACHE server in detail.
1. Modify the httpd. conf file
Add the following content at the end:
Include conf/mod_dav.conf # The following describes the settings of the file.
2. Create a file (mod_dav.conf) in the apache/conf/directory and enter the following content:
# Dav
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
DAVLockDB var/DavLock
Alias/webdav "/home/webdavfolder" # The following path is a folder on the hard disk of a computer (or server) and is used as the space for network storage.
Dav On
In this way, you can access it (via a windows Network Neighbor ). However, there is a fatal drawback in this way: access without a password is greatly reduced in installation.
3. Add security configurations
Edit the file in step 2 and change it:
# Dav filesystem
DAVLockDB var/DavLock
Alias/webdav "/home/webdavfolder"
Dav On
AuthType Basic
AuthName DAV
AuthUserFile/usr/local/svn-auth-file # password verification file
Require user user1
4. Create a/usr/local/svn-auth-file
Go to the apache/bin directory and run the following command to generate a password verification file:
htpasswd -cm /usr/local/svn/svn-auth-file user1
Enter the password when prompted.
To add user2, run the following command:
htpasswd -m /usr/local/svn/svn-auth-file user2
To delete a user (user2), run the following command:
htpasswd -D /usr/local/svn/svn-auth-file user2
5. Restart apache after modification.
Now you can securely access WebDAV. You can use http: // localhost/webdav to access shared resources. Of course, if you're configuring on the server, use the http://yourdomain.tld/webdav form for access. The user name and password are the content of the preceding settings.
Note: The above configurations are not verified and are for reference only.©
This article permanently updates the link address: