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
Procedure
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
Configure the WebDAV module
The apache server has integrated the WebDAV module, so you only need to enable this module.
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
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>
Create access directory$ mkdir -p /var/www/webdav
$ chown apache:apache /var/www/webdav
Add User$ Htpasswd-c/etc/httpd/webdav. users. pwd test # enter the password as prompted
Restart the apache service$ service httpd restart
Test access through a browser: access the local machine, access remote: http: // ip/webdav test results:
So far, webDAV is enabled successfully.