/*********************************************************************************************
In iOS development, it is often necessary to perform various functional tests with the backend server, in which case the WebDAV in HTTP mode is often encountered and put tested. Because there are few configuration methods specifically for Mac systems in the network, it is not easy for iOS beginners to find a reference, The result is a lot of confusion and doubt in the actual work, at the same time, in order to forget the configuration step in the future development, so record the actual operation steps, convenient for future query.
Reference Original: http://www.cnblogs.com/traximus/archive/2013/02/02/2890247.html
Note: After Mac OSX 10.9, the settings for Web sharing are canceled in System preferences, you need to manually launch Apache in the terminal via the command line
****************************************************************************************************/
First Enable Http-dav
1. Modify the file hppd.conf
Cd/etc/apache2
sudo vim httpd.conf
/httpd-dav.conf
Press 0 (is the number 0)/** to move the cursor to the beginning of the line */
Press X to delete #
Esc
: Wq
2. Modify the Hppd-dav extension file
Cd/etc/apache2/extra
sudo vim httpd-dav.conf
In the file, locate the position in, and change the digest to Basic, save the exit;
3. Modify the user.passwd file
Cd/usr
sudo htpasswd-c/usr/user.passwd admin
sudo chgrp www/usr/user.passwd/** Modify user group to www*/
4. Create the relevant folder
4.1 Create Var folder, save davlockdb related files
sudo mkdir-p/usr/var
sudo chown-r Www:www/usr/var
4.2 Creating an Upload folder uploads
sudo mkdir-p/usr/uploads
sudo chown-r www:www/usr/uploads
5. Restart Apache
sudo apachectl-k restart