Configure the WebDAV server on Apache

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.