WebDav can be used entirely as a network share file server!
# 1. Two configuration files have been modified
# 2. Create a user name and password for the Web Access user
# 3. Two directories are created and administrative permissions are set
# Switch Directories
$ cd/etc/apache2
$ sudo vim httpd.conf
# Find httpd-dav.conf
/httpd-dav.conf
" remove beginning of line #"
# position the cursor at the beginning of the line
0
# Delete Comments at the beginning of the line
X
# Save Exit
: Wq
# Switch Directories
$ cd/etc/apache2/extra
# back up files (just back up once on the line)
$ sudo cp httpd-dav.conf Httpd-dav.conf.bak
# Edit configuration file
$ sudo vim httpd-dav.conf
" change Digest to Basic"
# Find Digest
/digest
# authtype Basic
# Enter edit mode
I
# return to command-line mode
Esc
# Save Exit
: Wq
# Switch directories, you can use the mouse to drag the way
$ cd to save the directory of put scripts
# Run the put configuration script with Administrator privileges
$ sudo./put
set Password two times : (example) 123456
Note: To configure Web-dav on Mac 10.10 you also need to open the following three modules in httpd.conf
LoadModule Dav_module libexec/apache2/mod_dav.so
LoadModule Dav_fs_module libexec/apache2/mod_dav_fs.so
LoadModule Auth_digest_module libexec/apache2/mod_auth_digest.so
Where put can execute the file:
# Toggle Directory echo"switch to/usr directory"CD/usr# Set user admin's password echo"set the password for admin"htpasswd-c/usr/user.passwd admin# Set Password file access group Echo"Creating related directories and modifying access rights ..."chgrp www/usr/user.passwd# Create Var folder, save davlockdb related files mkdir-p/usr/var# Modify var folder user Group Chown-R www:www/usr/var# Create an upload folder: Uploadsmkdir-p/usr/uploads# Modify Uploads folder user Group Chown-R www:www/usr/Uploadsecho"after the modification, please confirm ..."ls-Lgecho"restarting the Apache server"# restart Apacheapachectl-K Restart
View Code
Configure WebDAV under Mac