You can open the websites app from the launchpad:
The websites app is the place where you can add, remove and configure the websites in your OpenCms installation. You configure, e.g., site name, hostnames and encryption modes.
Furthermore, you configure the access to the workplace server, default site and shared folder.
The main view of the websites app provides an overview on the existing websites.
There are two global configuration options that you can set via the websites app. Click on the gear wheel () in the toolbar to open the dialog for global settings.
Global website options
- Workplace server
Here you configure the server url and encryption mode for accessing the workplace. You can configure multiple server urls.
As long as there's only one site configured, you can access the workplace via all server urls, independent of the configuration.- Default site
If for the server url (hostname + protocol, e.g. https://my-site.de) in the HTTP request getting to OpenCms no specific site is configured, the default site is served.
For a productive environment, we suggest an empty site returning only error pages, since anyone can map a domain to your server to get the default site served.As long as you do not add a security layer infront of OpenCms.The shared folder is where you place contents shared between various sites. By default it is "/shared/".
You can only select existing folders directly below the root site to prevent misconfigurations.
Via the "Add site" option () in the toolbar, you can add a new site. If you click the option, a dialog appears:
The dialog has several tabs with many settings. Typically, the "Basic setup" options suffice to create a new site from scratch. If you have a site template that you like to copy when creating a new site, the "Create site options are the interesting ones.
Be aware that some inputs will auto-fill or manipulate other fields.
When you click "OK" in the dialog after filling in appropriate values, the following happens:
- The site folder with some essential resources in is created (if not already present before).
- The template property is set at the site's root folder.
- The site is configured in the
opencms-sites.xml
configuration file (under{webapp home}/WEB-INF/config/
)
When you use the "Create site options" to copy an existing site (template) as your new site, the complete site structure will be copied.
Each entry in the list of existing sites has a context menu with options for the site:
OpenCms supports SSL-encrypted sites. The encryption is not done by OpenCms, but dependent on where you encrypt, the configuration option must be set accordingly.