[opencms-dev] Technical inquiry: Multi-server site routing under shared domain in OpenCms

Lorenz Lammersdorf l.lammersdorf at ik.me
Thu Sep 11 19:01:08 CEST 2025


Hi Ramon,

I assume you're using mod_proxy? It supports session stickyness.

Usually caching is done on the proxy. mod_proxy doesn't support caching, 
have a look into mod_cache.

You should probably use a load balancer instead of a reverse proxy (and 
I assume load balancing is the reason for this setup anyway). 
mod_proxy_balancer is maybe your friend.

Regards
Lorenz


Am 11.09.2025 um 18:38 schrieb Ramon Gavira Sáenz via opencms-dev:
> Hello,
> I'm currently working on setting up an OpenCms architecture where 
> multiple sites, hosted on separate OpenCms servers, are accessible under 
> a shared corporate domain using path-based routing. The intended 
> structure is as follows:
> 
>   * |http://www.corporate-domain.com/opencms-server1/site1| → served
>     by /site1/ on *OpenCms Server 1*
>   * |http://www.corporate-domain.com/opencms-server1/site2| → served
>     by /site2/ on *OpenCms Server 1*
>   * |http://www.corporate-domain.com/opencms-server2/site1| → served
>     by /site1/ on *OpenCms Server 2*
>   * |http://www.corporate-domain.com/opencms-server2/site2| → served
>     by /site2/ on *OpenCms Server 2*
> 
> To achieve this, I'm using *Apache HTTP Server* as a reverse proxy to 
> route requests based on URL path to the appropriate backend OpenCms 
> instance. However, I'm facing several issues that prevent the setup from 
> working reliably:
> 
>   * *Static export problems*: Some resources are not being served
>     correctly depending on the site and server.
>   * *AJAX calls*: Requests sometimes fail or are misrouted, especially
>     when dealing with dynamic content or session-dependent data.
>   * *Other inconsistencies*: Occasionally, internal links, resource
>     paths, or redirects behave unexpectedly, breaking the user experience.
> 
> I'm wondering:
> 
>   * Has anyone successfully implemented a similar architecture with OpenCms?
>   * Are there best practices or recommended configurations for Apache
>     (or alternatives like NGINX) to handle this kind of routing?
>   * Are there known limitations in OpenCms when operating behind a
>     reverse proxy with multiple instances?
>   * How do you handle session management, caching, and resource linking
>     across sites in this scenario?
> 
> Any technical insights, configuration examples, or documentation 
> references would be greatly appreciated.
> Thanks in advance!
> Ramon G.
> 
> 
> _______________________________________________
> 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
> 
> 
> 



More information about the opencms-dev mailing list