Open a WebDAV server in a Mac environment

Source: Internet
Author: User

1. First describe the HTTP common methods

Get gets the specified resource

POST submits data to the specified resource for processing requests

Head gets the specified resource header information

PUT replaces the specified resource (browser operation not supported)

Delete Deletes the specified resource

OPTIONS allows clients to view server performance

TRACE echo the request received by the server, primarily for testing or diagnostics

Connect is reserved for proxy servers that can change connections to pipelines (HTTP proxy usage)


Attention:

1. Due to security considerations, most servers do not open all HTTP request methods

2. Put and delete are currently not used much in the country, mostly by post, but put is the simplest way to implement file uploads in iOS development

2. Start the Http-dav feature (WebDAV server)

2.1 Opening the terminal

Cd/etc/apache2sudo Vim httpd.conf


Find in 2.2 vim

/httpd-dav.conf

Delete # comment, save exit



2.3 Modifying Httpd-dav extension files

Open Terminal

Cd/etc/apache2/extrasudo vimhttpd-dav.conf


Change the position in the digest to Basic, save exit


Attention:

1. The first red line location is modified by the way the user authorizes

2. The second red location is the file that holds the user's password (/USER/USER.PASSWD)

3. The third red location is the user name (Admin) that can use the put request

3. Modify the User.password file

3.1 Setting a password

Cd/usrsudo HTPASSWD–C/USR/USER.PASSWD Admin


Set a new password



3.2 Modifying user groups

sudo chgrp www/usr/usr.passwd



4. Upload folder settings

4.1 Creating a var folder

sudo mkdir-p/usr/varsudo chown-r Www:www/usr/var


4.2 Create an Upload folder: Uploads

sudo mkdir-p/usr/uploadssudo chown-r www:www/usr/uploads


4.3 Restarting Apache

sudo apachectl-k restart


LS-L Displays the file information below the USR folder


5. Test the WebDAV server

The first step




Step Two



Step Three



Fourth Step


Open a WebDAV server in a Mac environment

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.