Installing OpenCms

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

This configuration is only valid if OpenCms has been installed as the ROOT web application in Tomcat.

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:

<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 has 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 web server 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>
If you entered the correct settings using the auto-setup, no adjustment will be necessary (as long as you stay with the one default site).

For each configured site 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 host.

The OpenCms workplace should be accessed using a specific URL for the workplace. We recommend securing the OpenCms workplace using SSL.

你可能感兴趣的:(Installing OpenCms)