To make OpenCms work as expected on your server you should follow the hints given on this page.
In particular, we tell how to
/opencms
" in the "/opencms/opencms/
" part in URLs of OpenCms webpages,We assume you have already installed Tomcat as servlet container.
To make OpenCms work properly with Apache, install it as 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.
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 webserver, 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 learn about the details.
Edit the file WEB-INF/config/opencms-importexport.xml
in your OpenCms installation. Remove the ${SERVLET_NAME}
macro, such that the originally containing the macro look as shown below:
<rendersettings>
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
<vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
...
</rendersettings>
Now, the site configuration in the file WEB-INF/config/opencms-system.xml
have to be adjusted. As configured below, you have a secure site to access the workplace server and an unsecured site for accessing the default site. The configuration corresponds to theĀ Apache webserver configuration described in the documentation.
<sites>
<workplace-server>https://opencms.example.com</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server="http://www.example.com" uri="/sites/default/"/>
...
</sites>
For each configured sites virtual hosts have to be configured in the Apache web server. Note that you need to configure only one virtual host for secure, and one for unsecure sites. All sites can be added as aliases to that virtual hosts.