Technical inquiry: Multi-server site routing under shared domain in OpenCms
Ramon Gavira Sáenz via opencms-dev <[email protected]> Thu, 11 Sep 2025 16:38:37 +0000
| Newsgroups | gmane.comp.cms.opencms.devel |
|---|---|
| Message-ID | <DB9PR05MB8396101A8736F20C33520311E209A@DB9PR05MB8396.eurprd05.prod.outlook.com> |
--===============0099668942031528349==
Content-Language: es-ES
Content-Type: multipart/alternative;
boundary="_000_DB9PR05MB8396101A8736F20C33520311E209ADB9PR05MB8396eurp_"
--_000_DB9PR05MB8396101A8736F20C33520311E209ADB9PR05MB8396eurp_
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
SGVsbG8sDQpJJ20gY3VycmVudGx5IHdvcmtpbmcgb24gc2V0dGluZyB1cCBhbiBPcGVuQ21zIGFy
Y2hpdGVjdHVyZSB3aGVyZSBtdWx0aXBsZSBzaXRlcywgaG9zdGVkIG9uIHNlcGFyYXRlIE9wZW5D
bXMgc2VydmVycywgYXJlIGFjY2Vzc2libGUgdW5kZXIgYSBzaGFyZWQgY29ycG9yYXRlIGRvbWFp
biB1c2luZyBwYXRoLWJhc2VkIHJvdXRpbmcuIFRoZSBpbnRlbmRlZCBzdHJ1Y3R1cmUgaXMgYXMg
Zm9sbG93czoNCg0KICAqICAgaHR0cDovL3d3dy5jb3Jwb3JhdGUtZG9tYWluLmNvbS9vcGVuY21z
LXNlcnZlcjEvc2l0ZTEgofogc2VydmVkIGJ5IHNpdGUxIG9uIE9wZW5DbXMgU2VydmVyIDENCiAg
KiAgIGh0dHA6Ly93d3cuY29ycG9yYXRlLWRvbWFpbi5jb20vb3BlbmNtcy1zZXJ2ZXIxL3NpdGUy
IKH6IHNlcnZlZCBieSBzaXRlMiBvbiBPcGVuQ21zIFNlcnZlciAxDQogICogICBodHRwOi8vd3d3
LmNvcnBvcmF0ZS1kb21haW4uY29tL29wZW5jbXMtc2VydmVyMi9zaXRlMSCh+iBzZXJ2ZWQgYnkg
c2l0ZTEgb24gT3BlbkNtcyBT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IGEgc2ltaWxhciBhcmNoaXRlY3R1cmUgd2l0aCBPcGVuQ21zPw0KICAqICAgQXJlIHRo
ZXJlIGJlc3QgcHJhY3RpY2VzIG9yIHJlY29tbWVuZGVkIGNvbmZpZ3VyYXRpb25zIGZvciBBcGFj
aGUgKG9yIGFsdGVybmF0aXZlcyBsaWtlIE5HSU5YKSB0byBoYW5kbGUgdGhpcyBraW5kIG9mIHJv
dXRpbmc/DQogICogICBBcmUgdGhlcmUga25vd24gbGltaXRhdGlvbnMgaW4gT3BlbkNtcyB3aGVu
IG9wZXJhdGluZyBiZWhpbmQgYSByZXZlcnNlIHByb3h5IHdpdGggbXVsdGlwbGUgaW5zdGFuY2Vz
Pw0KICAqICAgSG93IGRvIHlvdSBoYW5kbGUgc2Vzc2lvbiBtYW5hZ2VtZW50LCBjYWNoaW5nLCBh
bmQgcmVzb3VyY2UgbGlua2luZyBhY3Jvc3Mgc2l0ZXMgaW4gdGhpcyBzY2VuYXJpbz8NCg0KQW55
IHRlY2huaWNhbCBpbnNpZ2h0cywgY29uZmlndXJhdGlvbiBleGFtcGxlcywgb3IgZG9jdW1lbnRh
dGlvbiByZWZlcmVuY2VzIHdvdWxkIGJlIGdyZWF0bHkgYXBwcmVjaWF0ZWQuDQpUaGFua3MgaW4g
YWR2YW5jZSENClJhbW9uIEcuDQoNCg==
--_000_DB9PR05MB8396101A8736F20C33520311E209ADB9PR05MB8396eurp_
Content-Type: text/html; charset="gb2312"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dgb2312">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"text-align: left; text-indent: 0px; line-height: 20px; margin=
: 1em 0px; display: block; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MS=
FontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0,=
0, 0);" class=3D"elementToProof">
Hello,</div>
<div style=3D"line-height: 20px; margin-top: 1em; margin-bottom: 1em; font-=
family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica,=
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof=
">
I'm currently working on setting up an OpenCms architecture where multiple =
sites, hosted on separate OpenCms servers, are accessible under a shared co=
rporate domain using path-based routing. The intended structure is as follo=
ws:</div>
<ul>
<li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, C=
alibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); line-h=
eight: 20px;">
<code>http://www.corporate-domain.com/opencms-server1/site1</code> =A1=
=FA served by <i>
site1</i> on <b>OpenCms Server 1</b></li><li style=3D"font-family: Apt=
os, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif=
; font-size: 12pt; color: rgb(0, 0, 0); line-height: 20px;">
<code>http://www.corporate-domain.com/opencms-server1/site2</code> =A1=
=FA served by <i>
site2</i> on <b>OpenCms Server 1</b></li><li style=3D"font-family: Apt=
os, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif=
; font-size: 12pt; color: rgb(0, 0, 0); line-height: 20px;">
<code>http://www.corporate-domain.com/opencms-server2/site1</code> =A1=
=FA served by <i>
site1</i> on <b>OpenCms Server 2</b></li><li style=3D"font-family: Apt=
os, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif=
; font-size: 12pt; color: rgb(0, 0, 0); line-height: 20px;">
<code>http://www.corporate-domain.com/opencms-server2/site2</code> =A1=
=FA served by <i>
site2</i> on <b>OpenCms Server 2</b></li></ul>
<div style=3D"line-height: 20px; margin-top: 1em; margin-bottom: 1em; font-=
family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica,=
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof=
">
To achieve this, I'm using <b>Apache HTTP Server</b> as a reverse prox=
y to route requests based on URL path to the appropriate backend OpenCms in=
stance. However, I'm facing several issues that prevent the setup from work=
ing reliably:</div>
<ul>
<li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, C=
alibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); line-h=
eight: 20px;">
<b>Static export problems</b>: Some resources are not being served correctl=
y depending on the site and server.</li><li style=3D"font-family: Aptos, Ap=
tos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font=
-size: 12pt; color: rgb(0, 0, 0); line-height: 20px;">
<b>AJAX calls</b>: Requests sometimes fail or are misrouted, especially whe=
n dealing with dynamic content or session-dependent data.</li><li style=3D"=
font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helve=
tica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); line-height: 20px;"=
>
<b>Other inconsistencies</b>: Occasionally, internal links, resource paths,=
or redirects behave unexpectedly, breaking the user experience.</li></ul>
<div style=3D"line-height: 20px; margin-top: 1em; margin-bottom: 1em; font-=
family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica,=
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof=
">
I'm wondering:</div>
<ul>
<li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, C=
alibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); line-h=
eight: 20px;">
Has anyone successfully implemented a similar architecture with OpenCms?</l=
i><li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService,=
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); line=
-height: 20px;">
Are there best practices or recommended configurations for Apache (or alter=
natives like NGINX) to handle this kind of routing?</li><li style=3D"font-f=
amily: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, =
sans-serif; font-size: 12pt; color: rgb(0, 0, 0); line-height: 20px;">
Are there known limitations in OpenCms when operating behind a reverse prox=
y with multiple instances?</li><li style=3D"font-family: Aptos, Aptos_Embed=
dedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12=
pt; color: rgb(0, 0, 0); line-height: 20px;">
How do you handle session management, caching, and resource linking across =
sites in this scenario?</li></ul>
<div style=3D"line-height: 20px; margin-top: 1em; margin-bottom: 1em; font-=
family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica,=
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof=
">
Any technical insights, configuration examples, or documentation references=
would be greatly appreciated.</div>
<div style=3D"line-height: 20px; margin-top: 1em; margin-bottom: 1em; font-=
family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica,=
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof=
">
Thanks in advance!</div>
<div style=3D"line-height: 20px; margin-top: 1em; margin-bottom: 1em; font-=
family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica,=
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof=
">
Ramon G.</div>
<div style=3D"text-align: left; text-indent: 0px; margin: 8px 0px 4px; disp=
lay: block; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Ca=
libri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=
=3D"elementToProof">
<br>
</div>
</body>
</html>
--_000_DB9PR05MB8396101A8736F20C33520311E209ADB9PR05MB8396eurp_--
--===============0099668942031528349==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGhpcyBtYWls
IGlzIHNlbnQgdG8geW91IGZyb20gdGhlIG9wZW5jbXMtZGV2IG1haWxpbmcgbGlzdApUbyBjaGFu
Z2UgeW91ciBsaXN0IG9wdGlvbnMsIG9yIHRvIHVuc3Vic2NyaWJlIGZyb20gdGhlIGxpc3QsIHBs
ZWFzZSB2aXNpdApodHRwczovL2xpc3RzLm9wZW5jbXMub3JnL21haWxtYW4vbGlzdGluZm8vb3Bl
bmNtcy1kZXYKCgoK
--===============0099668942031528349==--