Clients can author documents and publish them on your server. You can view, copy, move, and lock documents, and perform other WebDAV operations on collections of resources that are configured to support WebDAV on a virtual server. As server administrator, therefore, you need to create such collections.
For instance, you have a set of documents located in a folder called /info in the docroot of your virtual server, acme. You want the HR group in Acme Corp. to be able to work remotely with this folder.
To enable WebDAV globally:
Go to the Server Manager and click the Enable/Disable WebDAV link on the Preferences tab.
Click the Enable WebDAV Globally checkbox.
Click OK and then click Apply for the changes to take effect.
Go to the Class Manager interface of vsclass2.
Select the Content Management tab and click the Enable/Disable WebDAV link.
Check the Enable DAV checkbox corresponding to vsclass2.
You are now ready to create the WebDAV collection.
At a minimum, creating a collection involves specifying the path to a directory that you want to enable WebDAV on. Now, if this directory contains only static data (such as HTML pages or images), you need to specify only the URI path to the directory. However, if the directory also contains dynamic content (such as JSP, SHTML, or CGI programs), you must also specify a source URI.
For instance, you have a dynamic page, test.shtml in the collection. This page contains a script that displays today’s date on the browser. While creating the collection, you specify only a URI for the collection, and no source URI. In this case, when a client invokes the test.shtml page, how it appears on a browser is shown in the Figure 4-3: Page Displaying the Current Date for the Collection:
You can also configure a source URI for the collection, say /info_source. Now if a client invokes the test.shtml page, the figure below shows how it appears on a browser window:
By specifying a source URI for a collection, you expose the source of a resource to clients. This is discussed in Chapter 3, Enabling Access Control .
Exposing the source obviously has security implications and you are recommended to set access control on directories that you map source URIs against.
Create a collection and specify both URI and also a source URI so that the collection can expose the source of dynamic content.
Go to the Virtual Server Manager interface page for your virtual server, acme and select the WebDAV tab
Click the Add DAV Collection link
Specify /info as the URI and /info_source as the source URI
Set the Maximum Property Depth value to either 1 or infinity.
Click OK and then Apply to save and apply your changes.
You can specify other parameters for the collection in order to fine-tune the level of WebDAV support. For instance, you can set an upper limit on how much data a person can copy onto the server or for what length of time a resource can be locked. You can do this either at the time of creating the collection or at any time after you have created the collection using the Edit DAV Collections page.
Once you are done with creating or editing the collection, you need to ensure that only the user named “manager” and no one else has the right to access the collection.
You must ensure that filesystem permissions should be owned by the user the server is running as. For example, if /info is the URI for a WebDAV collection and if the server is running as a user named “Joe”, ensure that /info maps to a directory to which “Joe” has filesystem permissions.
Because WebDAV gives users the right to modify the content of collections on your server, you must ensure that these collections are protected against unrestricted and unauthorized access. For more information on enabling access control and security, see Chapter 3, Enabling Access Control.
If you need to provide access control and security to the collection that you have just created for only the user named “manager”, use the Edit ACL button on the Edit WebDAV Collections page to set this up.
The server is now set up to handle WebDAV requests.