[opencms-dev] ADE under multi-site server configuration

Rafael Garcia rafael.garcia at moremr.com
Thu Aug 23 09:57:41 CEST 2012


OK, the issue was solved. There was something misconfigured in 
opencms-importexport.xml:

Instead of:
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
<vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>

We should have had:
<rfs-prefix>/export</rfs-prefix>
<vfs-prefix></vfs-prefix>

This way OpenCMS is able to do the mapping between the domain name and 
the site server...

Rafael


Date: Mon, 20 Aug 2012 17:17:28 +0300
From: Rafael Garcia <rafael.garcia at moremr.com>
To: The OpenCms mailing list <opencms-dev at opencms.org>
Subject: [opencms-dev] ADE under multi-site server configuration
Message-ID: <503246F8.5090902 at moremr.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi all,

We are using OpenCMS 8.0.4 under Apache Tomcat 7.0.27 and Apache HTTP
proxy 2.2. We have configured multi-site servers, but we don't get ADE
to work when we login into the workplace.
Below the excerpts of the server.xml, opencms-system.xml, and httpd.conf.
The problem is that when we access " http://no.domain.com/system/login/"
(domain name of the one of the site servers) OpenCMS is redirecting us
to "http://www.domain.com/system/login/" (domain name of the workplace).
So when we proceed to login, switch to the site "/sites/no/", and click
on a page to edit it using ADE, the page doesn't exist (because the
domain is not right). So a page located under the VFS directory
"/sites/no/test/index.html" is accessible through
"http://no.domain.com/test/index.html" but not editable, since when we
click on it in the workplace we get "http://www.domain.com/test/index.html"

Why do we get redirected on first place? If the domain was kept when
accessing the login page we wouldn't have any issues, but we cannot
define more than one workplace URLs in opencms-system.xml, right?


Thanks!
Rafael

* server.xml
      <Connector port="50000" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 redirectPort="50443"
                 URIEncoding="UTF-8" />

     <!-- for opencms static export -->
      <Connector port="50001" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 redirectPort="50443"
                 URIEncoding="UTF-8" />

      <Connector port="50010" protocol="HTTP/1.1"
                 proxyName="m.domain.no" proxyPort="80"
                 connectionTimeout="20000"
                 redirectPort="50443"
                 URIEncoding="UTF-8" />

* opencms-system.xml
     <sites>
        <workplace-server>www.domain.com</workplace-server>
        <default-uri>/sites/default/</default-uri>
        <shared-folder>/shared/</shared-folder>
        <site server="www.domain.com" uri="/sites/default/"/>
        <site server="m.domain.no" uri="/sites/no/">
          <alias server="no.domain.com"/>
        </site>

* httpd.conf
<VirtualHost *:80>
      ServerAdmin support at domain.com
      ServerName m.domain.no
      ServerAlias no.domain.com

      <IfModule mod_proxy.c>
        ProxyRequests Off
        ProxyPreserveHost On

        ProxyPass /export/ http://localhost:50010/export/
        ProxyPassReverse /export/ http://localhost:50010/export/
        ProxyPass /resources/ http://localhost:50010/resources/
        ProxyPassReverse /resources/ http://localhost:50010/resources/
        ProxyPass /opencms/ http://localhost:50010/opencms/
        ProxyPass / http://localhost:50010/opencms/
        ProxyPassReverse / http://localhost:50010/opencms/

        <Proxy *>
           Order allow,deny
           Deny from all
        </Proxy>

        <Proxy http://localhost:50010/*>
           Order allow,deny
           Allow from all
        </Proxy>
      </IfModule>
    </VirtualHost>




More information about the opencms-dev mailing list