Installing OpenCms
To make OpenCms work as expected on your server you should follow the hints given on this page.
In particular, we say how to
- get rid of the first "
/opencms
" in the "/opencms/opencms/
" part in URLs of OpenCms webpages, - configure OpenCms to work with the Apache web server
We assume you have already installed Tomcat as the servlet container.
Deployment
To make OpenCms work properly with Apache, install it as the ROOT web application. To do so, rename the opencms.war
file to ROOT.war
. This is necessary to remove all OpenCms specific path parts (i.e., http://www.example.com/opencms/opencms/index.html) from the visible URLs.
After renaming the war file, deploy it by pasting it into Tomcat's webapps/
folder.
Setup
When OpenCms is deployed, it has to be set up. For a typical local installation, the setup wizard is used. If you can reach this wizard on your web server, you can use it as well. Therefore, follow theĀ instructions for the local installation and adjust the database configuration accordingly.
The more convienent way will be to use the setup script for setting up OpenCms. You provide a configuration and then run the script. Here you can learn about the details.
Configuration
Since OpenCms 10.5, OpenCms provides a special servlet filter, named OpenCmsUrlServletFilter and configured in the WEB-INF/web.xml
. It will add the "/opencms
" servlet name in URLs when necessary. It is already configured by default. Hence you don't have to alter your configuration. You may only need to adjust the filter configuration if for some URLs the opencms servlet should not be called. These are typically URL prefixed with names of additionally installed servlets. In that case, add the following init-param
to the filter configuration.
Alternative configuration when rewriting URLs in a proxy
For OpenCms versions < 10.5, edit the file WEB-INF/config/opencms-importexport.xml
in your OpenCms installation. Remove the ${SERVLET_NAME}
macro, such that the original containing the macro looks as shown below:
Site configuration
You have to correctly configure the sites via the websites app to get your system working correctly. Whenever more than one site is configured in OpenCms, you get to the workplace exclusively via the configured workplace url(s).
Improving XML unmarshalling performance
When OpenCms is the only webapp in your servlet container, you can alter the SAX parser configuration by adding the optional configuration node <sax-impl-system-properties>
with value true
, below the sites configuration in the opencms-system.xml
, as shown below.
<opencms>
<system>
<!-- ... -->
<sites>
<!-- ... -->
</sites>
<!-- ADD THE FOLLOWING LINE below the "sites" node or replace value "false" with "true" -->
<sax-impl-system-properties>true</sax-impl-system-properties>
<!-- ... -->
</system>
</opencms>
If you set the option to true, the SAX parser implementation classes that are used by OpenCms are stored in Java system properties when OpenCms starts. If the properties are set, these implementations are directly used. If not, for each unmarshal process the implementations are detected over and over again.
You can improve this page
Please contribute your suggestions or comments regarding this topic on our wiki. For support questions, please use the OpenCms mailing list or go for professional support.