OpenCms WebDAV Configuration
The access to OpenCms through WebDAV is realized with an own servlet (the CmsWebdavServlet). A default configuration of this servlet is already entered in the
web.xml configuration provided with the OpenCms web application:
<description>Creates an access to OpenCms through WebDAV.</description>
There are three parameters which allows you to configure the WebDAV access:
- listings: If set to true (the default), you could browse to the contents of OpenCms with a Web Browser.
But this way it is not possible to edit, delete or create resources in OpenCms. Through the Web Browser it is only possible to list and view the resources.
- readonly: Though permissions set in OpenCms find attention in the WebDAV protocol as well, it is possible to set the access to OpenCms through WebDAV to all users to read only.
- repository: This parameter usually should not be changed. It defines the repository to use through the WebDAV servlet.
The default value specifies that the standard repository should be used, which means that you see the resources in OpenCms through this servlet. The complete documentation describes the use of the default repository. See chapter "Configuration of the repositories in the opencms-importexport.xml" to learn more of the repositories in OpenCms.
The second entry in the
web.xml file defines the servlet mapping. In other words the url where to get access to the WebDAV servlet:
As default you will find the WebDAV access by adding "webdav" to the servlet context. If you have OpenCms installed as a web application "opencms" in your web application container (running at port 8080) you can login to the workplace with the following url:
Then you will find the WebDAV at this url:
Configuration of the repositories in the opencms-importexport.xml
In the configuration file
opencms-importexport.xml you can configure the repositories to access the resources in the VFS of OpenCms.
As default there are 2 configurations: "standard" and "extended".
The standard repository mainly adds the correct extensions to the resources in the VFS, before delivering to the client of the repository (in this case this is the WebDAV client).
The extensions are added through the defined "wrappers" used. Additionally the system folder is made visible, so that you have access to the system folder even if you are not in the root site. Another wrapper adds a virtual folder (which does not exists in the VFS of OpenCms) with files containing the properties of the existing resources. Here you can change the properties of the resources. If you save one of these files the content will be taken to fill the properties of the resource.
With filters you are able to restrict which folders and/or files will be visible to the clients using this repository. There can be one or more regular expressions to be included or excluded from being visible.
The name of the repository can then be taken to be used in the
Below you find the xml configuration of the standard repository.
<repository name="standard" class="org.opencms.repository.CmsRepository">
Additional information for removing
/opencms/opencms with Apache HTTP server
If you want to remove the "/opencms/opencms" prefix in the url, you have to set up an Apache HTTP Server with an VirtualHost entry in the
httpd.conf (see Alkacon Documentation).
To make the WebDAV access to OpenCms work again after configuring this way, you have to insert the following lines to the VirtualHost entry in your
ProxyPass /webdav/ http://127.0.0.1:8086/webdav/
ProxyPass /webdav http://127.0.0.1:8086/webdav/
Replace the server name (127.0.0.1) and the port (8086) with the entries that are correct in your configuration.