Enable the webDAV module on the Apache server under CentOS6

Source: Internet
Author: User

Enable the webDAV module on the Apache server under CentOS6

These days, we have set up a runtime environment on CentOS6, including WebDAV. Although there are a lot of online materials, they are not very detailed (maybe because I am a newbie ), however, after a few hours of hard work, I had to set up WebDAV, so I had to record it for future reference, at the same time, I hope to help my colleagues set up WebDAV for the first time. The following are the specific steps:

Environment Information
  • CentOS/6.8
  • Apache/2.2.15
Procedure
  1. Install apache

    # Install apache $ yum-y install httpd apr-util httpd-devel # Set startup (optional) $ chkconfig httpd on # start the apache service $ service httpd start # temporarily close the firewall (if not disabled, only the local machine can access the apache service) $ service iptables stop
  2. Configure the WebDAV module
    The apache server has integrated the WebDAV module, so you only need to enable this module.

    1. Edit/etc/httpd/conf/httpd. conf
      $ vi /etc/httpd/conf/httpd.conf
      Add the following statement at the end of the file:
      Include conf/webdav. conf # specify the path of the webdav configuration file

    2. Create a webdav configuration file
      $ vi /etc/httpd/conf/webdav.conf
      Insert the following content into the file:

      <IfModule mod_dav.c>LimitXMLRequestBody 131072Alias /webdav "/var/www/webdav"<Directory /var/www/webdav> Dav On Options +Indexes IndexOptions FancyIndexing AddDefaultCharset UTF-8 AuthType Basic AuthName "WebDAV Server" AuthUserFile /etc/httpd/webdav.users.pwd Require valid-user Order allow,deny Allow from all</Directory></IfModule>
    3. Create access directory$ mkdir -p /var/www/webdav $ chown apache:apache /var/www/webdav

    4. Add User$ Htpasswd-c/etc/httpd/webdav. users. pwd test # enter the password as prompted

    5. Restart the apache service$ service httpd restart

  3. Test access through a browser: access the local machine, access remote: http: // ip/webdav test results:

    So far, webDAV is enabled successfully.

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.