[opencms-dev] Problem with multisite-config an internal links

Christian.Weber at Bertelsmann.de Christian.Weber at Bertelsmann.de
Sun Dec 10 22:31:45 CET 2006


Hello

I have various problems with multisite-config an internal links in
OpenCMS 6.2.2.
One problem is that internal links are converted to external links
containing the workplace server name

Here is my configuration: 
I have a frontend Apache Webserver with mod_proxy and mod_rewrite and
I'm convinced that the configuration is as described in the various
multisite threads. The are three virtual hosts in my Apache conf:

https://workplace should serve the workplace for editors
http://mysite should serve the website for webusers
https://mysite should serve secured parts of the website for webusers

Each virtual host connects to its own Tomcat connector having the
appropriate proxyName. 

1) 
My opencms-system.xml looks like this:

<sites>
  <workplace-server>https://workplace</workplace-server>
  <default-uri>/sites/mysite/</default-uri>
  <site server="http://mysite:80" uri="/sites/mysite/">
    <secure server="https://mysite:443" exclusive="true" error="false"/>
  </site>
</sites>

Running OpenCMS with this configurations works almost fine except when I
create internal links using the FCKeditor.
If i add a link to some text field, edit the document two times, then
the link is converted to an external link. 
Unfortunately the link-URI contains the workplace-servername!

I figured out that the OpenCMS SiteManager claas matches the links to
its servernames configured in opencms-system.xml. Obviously, the
workplace-server URI is not known by the SiteManager.

2) Therefore I changed my configuration by changing the site-uri and
adding an alias:

<sites>
  <workplace-server>https://workplace</workplace-server>
  <default-uri>/sites/mysite/</default-uri>
  <site server="https://workplace" uri="/sites/mysite/">
    <secure server="https://mysite" exclusive="true" error="false"/>
    <alias server="http://mysite"/>
  </site>
</sites>

Now the problem with internal links is solved, but a new problem occurs:
A) I access a page at http://mysite/page1.html
B) Then I follow a link to a page which is marked as "secure=true" at
https://mysite/page2.html
C) Now I follow a link to another page which is not secured. Now the
link points to http://workplace/page3.html
The linkbuild creates an absolut uri which points to the workplace
server. Maybe this is becaus mysite is configured as alias.

3) So I changed again my configuration to this. The sitemanager should
know that there are two different sites:

<sites>
  <workplace-server>https://workplace</workplace-server>
  <default-uri>/sites/mysite/</default-uri>
  <site server="https://workplace" uri="/sites/default/">
  <site server="http://mysite" uri="/sites/mysite/">
    <secure server="https://mysite" exclusive="true" error="false"/>
  </site>
</sites>

Now I have again problem creating internal links as described above at
pos 1). In contrast a internal link /sites/mysite/a/b ist converted to
/sites/default/a/b.

Ok, a workaround would be to drop the workplace-URI and run the
workplace under the mysite-URI. But nevertheless I think this kind of
multisite-configuration should work.

So please help!

Kind regards
Christian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061210/a1009ab1/attachment.htm>


More information about the opencms-dev mailing list