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

Christoph Kukulies kuku at physik.rwth-aachen.de
Mon Dec 4 12:52:49 CET 2023


I'm still not done with having my configuration right.

Currently 
opencms-sites.xml is:

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

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

system.xml:

<!-- connectors in /var/lib/tomcat9/conf/server.xml -->

<Connector port="8082" maxHttpHeaderSize="8192" protocol="HTTP/1.1"
     proxyName="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" maxThreads="150" enableLookups="false"
     redirectPort="8443" acceptCount="100" connectionTimeout="20000"
     disableUploadTimeout="true" />



In my OpenCMS-16 I have 

/sites/default
/sites/kuku

In the latter (/sites/kuku) I have an index.html.
In /sites/default there is the redirect to /overview

Trying to access https://www.mydomain.org/ <https://www.mydomain.org/> I'm getting a 404. Also https://www.mydomain.org/index.html <https://www.mydomain.org/index.html> give the 404.

tomcat log confirms this:

127.0.0.1 80 - - [04/Dec/2023:12:46:45 +0100] "GET /index.html HTTP/1.1" 404 7085

Tomcat is the backend server to the haproxy frontend.

(substitute mydomain by my last name to get a real life test)

--
Christoph




> Am 16.11.2023 um 17:17 schrieb Christoph Kukulies via opencms-dev <opencms-dev at opencms.org>:
> 
> Hi Kai,
> 
> this got me a bit further, to be precise, the following now works and gives me something to build upon:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-sites.dtd <http://www.opencms.org/dtd/6.0/opencms-sites.dtd>">
> 
> <opencms>
>         <sites>
>                 <workplace-server>http://cms.mydomain.org:8082 <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/kuku/">
>                         <parameters>
>                                 <param name="locale.main">en</param>
>                                 <param name="locale.secondary">de</param>
>                         </parameters>
>                 </site>
>         </sites>
> </opencms>
> 
> I was able to put an index.html into the new root (/sites/kuku) and I removed to redirect to "overview" in the default root.
> 
> Thanks for helping.
> 
> --
> Christoph
> 
> 
> Christoph
> „The Hammond Tonewheel Organ - God’s Harmonica"
> 
>> Am 16.11.2023 um 14:00 schrieb Schliemann, Kai <K.Schliemann at comundus.com <mailto:K.Schliemann at comundus.com>>:
>> 
>> Hi Chris,
>>  
>> I am not sure, but please check, if it is possible to use two different sites (cms.mydomain.org <http://cms.mydomain.org/> andwww.mydomain.org <http://www.mydomain.org/>) with the same uri “/sites/default/”.
>> I assume, that cms.mydomain.org <http://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:808 <http://cms.mydomain.org:808/>2</workplace-server>
>>     <default-uri>/sites/default/</default-uri>
>>     <shared-folder>/shared/</shared-folder>
>>     <site server="http://www.mydomain.org:8080 <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 <mailto: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 <mailto:opencms-dev at opencms.org>>
>> Cc: Christoph Kukulies <kuku at physik.rwth-aachen.de <mailto: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:
>> <image001.png>
>> 
>> 
>> /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 <http://www.opencms.org/dtd/6.0/opencms-sites.dtd>">
>> 
>> <opencms>
>>   <sites>
>>     <workplace-server>http://www.mydomain.org:8080 <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 <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 <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
>>  
>> 
> 
> _______________________________________________
> 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
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20231204/2702ef56/attachment.htm>


More information about the opencms-dev mailing list