Apache WebDAV settings

Source: Internet
Author: User
Tags subversion client microsoft iis

From: http://blog.myspace.cn/e/401362066.htm

 

WebDAV Settings "href =" http://blog.myspace.cn/e/401362066.htm "> Apache WebDAV settings

The WebDAV (Web Distributed creation and Version Control) protocol is a new HTTP-based protocol that allows users to remotely perform basic file operations, such as copying, moving, and deleting files on the web.
Division. Now we can find WebDAV on apahe and Microsoft IIS. The WebDAV function is embedded in Windows and Mac OS.
X and other common desktop operating systems, as well as popular software from Adobe, Lotus, Microsoft and other companies. Major documentation and content management vendors in the industry also widely support it.

WebDAV Workflow



WebDAV workflow-1.


When you edit a document stored on the WebDAV server, you can lock the document to ensure that your revision will not be overwritten by other users. WebDAV version control also helps users understand
Which version of the document is up-to-date to reduce unnecessary confusion.


The WebDAV access control table provides advanced control over the reading, writing, and sharing permissions for each file, further improving the system security. The file management feature of WebDAV has made it a traditional document.
A cost-effective alternative for management products. Any web server that supports WebDAV can provide a complete system for secure creation.

Server software supporting WebDAV

Currently, both Apache server and IIS (Version 5.0 and later) server support WebDAV. Here we will mainly introduce Apache
Server support. Apache supports WebDAV through mod_dav from version 1.x.
, But this module has stopped development, you can understand through the http://www.webdav.org/mod_dav.

We recommend that you use WebDAV in Apache 2.0 and 2.2.

Apache of WebDAV
2. settings on X Series servers

(1) compile your own Apache server

For self-compiled Apache 2.2 or 2.0 servers, add the parameter "enable-Dav" to compile.
After compilation, run the following command: # cd
/
Etc
/
Apache2
/
MODS
-
Enabled
/

# Ln
-
S
/
Etc
/
Apache2
/
MODS
-
Available
/
Dav. Load
Dav. Load

# Ln
-
S
/
Etc
/
Apache2
/
MODS
-
Available
/
Dav_fs.load
Dav_fs.load

# Ln
-
S
/
Etc
/
Apache2
/
MODS
-
Available
/
Dav_fs.conf
Dav_fs.conf



Add two lines to the configuration file of the Apache server: davlockdb.
/
TMP
/
Davlock

Davmintimeout
600
!



Create a WebDAV Directory and add the access permission: # mkdir
/
VaR
/
WWW
/
WebDAV

# Chown root: Apache
/
VaR
/
WWW
/
WebDAV

# Chmod
750
/
VaR
/
WWW
/
WebDAV



Create a simple configuration:

<Directory/var/www/WebDAV>
Dav on
</Directory>


So far, the configuration of WebDAV on the Apache server has been basically completed, but its security performance is not good at present. I will gradually improve it later.

(2) Set WebDAV on the Apache 2.2.3 server of RHEL 5.0.
Check Compilation
First, check whether the Dav module is compiled for the apoache 2.2.3 of RHEL 5.0, and use the httpd-M command, 2.

Figure 2 shows that WebDAV has been compiled on the Apache 2.2.3 server of RHEL 5.0.

Modify the Apache configuration file

Next, check the Apache server configuration file httpd. conf, load the Dav module, and remove the # Before the following two lines.
Loadmodule dav_module modules/mod_dav.so
Loadmodule dav_fs_module modules/mod_dav_fs.so
Remove the following #
<Ifmodule mod_dav_fs.c>
# Location of the WebDAV lock database.
Davlockdb/var/lib/Dav/lockdb
</Ifmodule>
Add a row
Davmintimeout 600!

Set the client to access the WebDAV Directory
<Directory/var/www/WebDAV/Joe/>
Require user Joe
</Directory>

Set permissions
# Mkdir/var/www/passwd
# Htpasswd-C/var/www/passwd/htpass. Dav Joe
# Chown root: Apache/etc/apache2/passwd/htpass. Dav
# Chmod 640/var/www/passwd/htpass. Dav Joe
# Mkdir/var/www/WebDAV/Joe
# Chown Apache: Apache/var/www/WebDAV/Joe
# Chmod 750/var/www/WebDAV/Joe



Note: The above commands are basic functions of Apache server settings. I will not go into details here. Please understand. Or view the manual.WebDAV in Windows
Settings on the Apache server of the platform

The following describes how to configure WebDAV on an Apache server in a Windows operating system.

Modify the configuration file httpd. conf to remove the following three lines:

Loadmodule dav_module
Modules
/
Mod_dav.so

Loadmodule dav_fs_module modules
/
Mod_dav_fs.so

Include Conf
/
Extra
/
Httpd
-
Dav. conf


Modify the httpd-dav.conf profile to 3:


Note: Here I use the basic authentication method. In addition, digest authentication is safer than basic authentication, but unfortunately not all browsers currently support digest authentication, therefore, in most cases, users only use the basic
Authentication. This section describes basic authentication.
Create the password file htpasswd.exe
-
C
"
D:/Apache Software Foundation/apache2.2/davpwd/user. pwd
"
Dav@MyDomain.com



After you enter the command, you will be prompted to enter the password twice. 4.

So far, all the work of configuring WebDAV on the Apache server has been completed. Later I will introduce how to access the server through the webDAV client software.Access the server through webDAV client software

WebDAV client software

The main webDAV client software is shown in table-1.


Note: a WebDAV application is a program with built-in WebDAV protocol. Table-1 will cover most popular programs that support WebDAV. In Windows, there are some famous integrations
Software for webDAV client functions, such as Microsoft's
Office, Adobe Photoshop, and Macromedia Dreamweaver. Both of them can directly open and save URLs, or a large number
Use WebDAV lock.

WebDAV in Windows
How to use client software to access servers in Linux




Here, the Microsoft Network folder is used as an example. Microsoft is the earliest supporter of the WebDAV specification and the earliest
98 configuration client, called "Network folder", also exists on Windows NT4 and 2000.

The earliest webfolders client is a browser extension. It mainly browses the GUI program of the file system and works well. In Windows
98. If there is no network folder in my computer, this feature must be installed explicitly. In Windows
2000, you only need to add a new "network location", enter the URL, and the WebDAV sharing will pop up for you to browse. The procedure is as follows:

1. To use the Web Folder provided by Windows 2003, You can first open "Network neighbors", then double-click "add network neighbors", 5
.

2. In the dialog box, enter a URL using the HTTP protocol. You can use either an IP address or FQDN. -6.

3. Click "Next" to bring up the authentication dialog box, as shown in-7.

4. Enter the user name and password of Joe and click "OK" to go to the page shown in-8.

After changing the name of the network neighbor, the Web Folder shown in-9 is displayed. In this interface, you can access the Web
Folder to update the site content. If you use a browser to access this site, you will be directed to the home page without a pop-up authentication interface. This is what we need.

Figure 9 Web Folder

Note: To ensure security, you must delete the web folder after the site is updated.

WebDAV in Linux
How to use client software to access the server

1. command line tool


Cadaver is a Linux and Unix Command Line program used to browse and modify WebDAV sharing, just like a subversion client, which uses the neon HTTP Library
-Don't be surprised. The authors of neon and cadaver are the same person. Cadaver is free software (GPL license) that can be used in http://www.webdav.org/cadaver/
Download.
Using cadaver is like using a command line FTP program, so it is suitable for basic WebDAV debugging. It can upload and download files in compression mode, and also checks attributes, copies, moves, and locks
And unlock files:

 

 

$ Cadaver http: // host/Repos

Dav:/repos/> ls
Listing collection '/repos/': succeeded.
Coll:> foobar 0 May 10 16:19
> Playwright. El 2864 May 4
> Proofbypoem.txt 1461 May 5
> Westcoast.jpg 66737 May 5

Dav:/repos/> put readme
Uploading readme to '/repos/readme ':
Progress: [===========================>] 100.0% of 357
Bytes succeeded.

Dav:/repos/> Get proofbypoem.txt
Downloading '/repos/proofbypoem.txt' to proofbypoem.txt:
Progress: [===========================>] 100.0% of 1461
Bytes succeeded.

 

Dav explorer is another standalone running webDAV client, written in Java, has a class Apache license, the website is http://www.ics.uci.edu /~ WebDAV/
. Dav
Explorer is similar to cadaver and has the advantages of portability and a user-friendly GUI program. It is also the earliest support for WebDAV access control protocol (RFC
(3744.

2. browser integration


Some popular file browser programs support WebDAV extension, allowing users to browse Dav sharing like accessing the local machine and allowing basic directory tree operations. For example, in Windows resource manager
The WebDAV server is regarded as a "network location". You can drag a file from the desktop to this directory, or rename, copy, or delete the file. But this is only a feature of the file browser, Dav sharing
Common applications are invisible, and all dav operations must be performed on the browser interface. Linux includes: Nautilus and Konqueror.

Nautilus is GNOME Desktop (http://www.gnome.org
)
Official file management/browser, KDE Desktop (http://www.kde.org
)
It is Konqueror. Both applications are browser-level WebDAV clients, which works well for automatically versioning version libraries.
In gnome's Nautilus, select Open Location from file menu and enter the URL. The version library is displayed, just like other file systems.


In Konqueror of Kde, you need to use WebDAV: // mode in the address bar to enter the URL. If you enter the http: // URL, Konqueror will be like a normal
Web browser. You will see the list of common HTML directories output by mod_dav_svn. Input WebDAV: // host/repos to replace http: // host/Repos
, Konqueror becomes a webDAV client,
The version library is displayed in the file system mode. In Konqueror, you must first perform identity authentication. -10.

Figure-10 in Konqueror, identity authentication is required first.

Through identity authentication, you can perform WebDAV management, 11.

Figure 11 WebDAV management in the Konqueror Browser

WebDAV client software for Mac OS X

The OS X operating system of apple is an integrated File System Client. With the finder, select connect
Server entry, enter the WebDAV URL, and a disk is displayed on the desktop, just like other mounted volumes.

Use SSL to protect WebDAV Security


Enable SSL to enhance communication security. Because WebDAV is created on a web site, you can use SSL to encrypt communication and ensure data security. The configuration is very simple. The following is a virtual
The server's SSL configuration WebDAV configuration instance. I will not go into details here about SSL configuration as a basic skill for Apache server settings. Please understand. Or view the manual.


Namevirtualhost*: 443
<Virtualhost 10.1.1.2: 443>
DocumentRoot/home/Bob/web/html/
Servername dav.mydomain.com
Sslengine on
Sslcertificatefile/etc/httpd/CONF/SSL. CRT/server. CRT
Sslcertificatekeyfile/etc/httpd/CONF/SSL. Key/server. Key
Davlockdb/tmp/mydomaindavlock
<Directory/home/Bob/web/html/>
AllowOverride all
Order allow, deny
Allow from all
Dav on
</Directory>
</Virtualhost>


Summary:

So far, we have introduced the WebDAV configuration of the Apache server and how to use the client software.

 

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.