[opencms-dev] Opencms 21 Multisite Setup

Michael Emmerich m.emmerich at alkacon.com
Mon Sep 28 09:06:04 CEST 2026


Hello Lorenz,

some time ago, we have written a few blog articles on the opencms.org 
website how to create your own website using the Mercruy template. It 
explains how to set up a new site, how to configure it to use Mercury 
and how you can adopt it to your styling.

Maybe this will be a good starter:

1) How do I set up a new website with OpenCms and the Mercury template?

https://www.opencms.org/en/article/How-to-create-a-new-website-using-the-Mercury-template


2) Creating the Site Structure in OpenCms with the Sitemap Editor

https://www.opencms.org/en/article/Creating-the-Site-Structure-in-OpenCms-with-the-Sitemap-Editor


3) Understanding page structure with the Mercury template

https://www.opencms.org/en/article/Understanding-page-structure-with-the-Mercury-template


For customizing the Mercury template, we show this how it can be made 
with Vite:

4) Front-end development in OpenCms with Vite

https://www.opencms.org/en/article/Modern-front-end-development-in-OpenCms-with-Vite


5)  Create your custom theme for the Mercury template

https://www.opencms.org/en/article/3edf0134-c128-11f0-adf0-0242ac11002b


This should give some more info, espeically if did not do so much with 
the newer OpenCms versions and Mercury.


The general way of setting up multiple sites in OpenCms has nor really 
changed since 10.5, the biggest difference is that the sites are not 
saved in the opencms-system.xml anymore, but in the opencms-sitres.xml 
config.

When you use more than one site in OpenCms (defined in the site websites 
app), you must have a dedicated workplace server url. I do not know if 
this was required in 10.5 already or if this was introduced later.

If you only have one site, lets say "www.sitea.com", then you can login 
the workplace with "www.sitea.com/opencms/system/login" (if your 
webapplication name is "opencms").

But if you have two sites configures "www.sitea.com" and 
"www.siteb.com", you need to configre an idividual workplace server url, 
e.g. "edit.sitea.com". You would then use 
"edit.sitea.com/opencms/system/login" to log in.


Kind regards,

Michael



Am 25.09.26 um 21:14 schrieb Lorenz Lammersdorf via opencms-dev:
> Ladies, Gentlemen,
>
> it's been a while since I had to set up Opencms (10.5 was the latest 
> version I used) and I'm a little confused on how to set up multiple 
> sites in Opencms 21.
>
> I have two websites, site1.blabla.com and site2.blabla.com. Site1 uses 
> the original Mercury template, for site2 I want to use the Mercury 
> template as base with some functional changes and of course another 
> design So I created my own module and copied the needed Mercury 
> elements into the  new module folders. Unfortunately it  seems I do 
> something wrong, no matter what I do, I'm not able to connect to site2 
> (which is probably caused by a missing setting in nginx). And, even 
> worse. once site2 is created I get an error when I try to access the 
> workplace from any configured site:
>
> "Accessing workplace or ADE through a server which has not been 
> configured. Your site configuration is probably incorrect."
>
> Opencms is behind nginx, nginx is used as proxy for site1 and site 2:
>
> server {
>     server_name site1.blabla.com;
>
>     location / {
>         proxy_pass http://127.0.0.1:8080;
>         proxy_set_header Host $host;
>         proxy_http_version 1.1;
>         proxy_set_header Connection "";
>         proxy_set_header X-Real-IP $remote_addr;
>         proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
>         proxy_set_header X-Forwarded-Proto $scheme;
>         proxy_cache_bypass $http_upgrade;
>         proxy_read_timeout 120s;
>     }
>
> Regards
> Lorenz
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
-- 
Michael Emmerich
  
-------------------
Alkacon Software GmbH & Co. KG - The OpenCms Experts
  http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list