[opencms-dev] Accessing workplace or ADE through a server which has not been configured (OpenCMS16)

Schliemann, Kai K.Schliemann at comundus.com
Thu Nov 16 14:00:27 CET 2023


Hi Chris,

I am not sure, but please check, if it is possible to use two different sites (cms.mydomain.org and www.mydomain.org<http://www.mydomain.org>) with the same uri "/sites/default/".
I assume, that cms.mydomain.org is your workplace url, so you don't need that as site but put that uri as workplace server. So this might be the correct config for you:

<opencms>
  <sites>
    <workplace-server>http://cms.mydomain.org:8082</workplace-server>
    <default-uri>/sites/default/</default-uri>
    <shared-folder>/shared/</shared-folder>
    <site server="http://www.mydomain.org:8080" uri="/sites/default/">
      <parameters>
        <param name="locale.main">en</param>
        <param name="locale.secondary">de</param>
      </parameters>
    </site>

  </sites>
</opencms>

Best regards
Kai


Von: opencms-dev <opencms-dev-bounces at opencms.org> Im Auftrag von Christoph Kukulies via opencms-dev
Gesendet: Donnerstag, 16. November 2023 11:14
An: The OpenCms mailing list <opencms-dev at opencms.org>
Cc: Christoph Kukulies <kuku at physik.rwth-aachen.de>
Betreff: [opencms-dev] Accessing workplace or ADE through a server which has not been configured (OpenCMS16)

I'm having a bit trouble getting a newly installed OpenCMS 16 on its feet. I edited

/var/lib/tomcat9/webapps/ROOT/WEB-INF/config/opencms-sites.xml

and since that time I'm getting an alert box:
[cid:image001.png at 01DA1895.400CB7E0]


/var/lib/tomcat9/webapps/ROOT/WEB-INF/config/opencms-sites.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-sites.dtd">

<opencms>
  <sites>
    <workplace-server>http://www.mydomain.org:8080</workplace-server>
    <default-uri>/sites/default/</default-uri>
    <shared-folder>/shared/</shared-folder>
    <site server="http://www.mydomain.org:8080" uri="/sites/default/">
      <parameters>
        <param name="locale.main">en</param>
        <param name="locale.secondary">de</param>
      </parameters>
    </site>
    <site server="http://cms.mydomain.org:8082" uri="/sites/default/">
      <parameters>
        <param name="locale.main">en</param>
        <param name="locale.secondary">de</param>
      </parameters>
    </site>
  </sites>
</opencms>

I have an haproxy 2.8 as a frontend:
Except of haproxy.cfg:


    acl is_static       path_beg /export/ /opencms/ /resources/ /javadoc/ /VAADIN/ /workplace /opencms-login/
    acl is_website      hdr_beg(host) -i www.mydomain.org<http://www.mydomain.org>
    acl is_cmssite      hdr_beg(host) -i cms.mydomain.org<http://cms.mydomain.org>
    use_backend website-static if is_website is_static
    use_backend website if is_website
    use_backend cmssite if is_cmssite

backend letsencrypt-backend
    server letsencrypt 127.0.0.1:8888

backend website-static
    server www.mydomain.org<http://www.mydomain.org> 127.0.0.1:8080

backend website
    http-request replace-header Destination ^([^\ :]*)\ /(.*) \1\ /opencms/\2
    server www.mydomain.org<http://www.mydomain.org> 127.0.0.1:8080
backend cmssite
    http-request replace-header Destination ^([^\ :]*)\ /(.*) \1\ /opencms/\2
    server cms.mydomain.org<http://cms.mydomain.org> 127.0.0.1:8082

Except of /var/lib/tomcat9/conf/server.xml:

<Connector port="8082" maxHttpHeaderSize="8192" protocol="HTTP/1.1"
     proxyName="cms.mydomain.org<http://cms.mydomain.org>" maxThreads="150" enableLookups="false"
     redirectPort="8443" acceptCount="100" connectionTimeout="20000"
     disableUploadTimeout="true" />

<Connector port="8080" maxHttpHeaderSize="8192" protocol="HTTP/1.1"
     proxyName="www.mydomain.org<http://www.mydomain.org>" maxThreads="150" enableLookups="false"
     redirectPort="8443" acceptCount="100" connectionTimeout="20000"
     disableUploadTimeout="true" />


Any clues what might be misconfigured?


--
Christoph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20231116/033a76d9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 125123 bytes
Desc: image001.png
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20231116/033a76d9/attachment.png>


More information about the opencms-dev mailing list