[opencms-dev] OpenCms for Muliple Sites?

Simon Wilks simon.wilks at silion.ch
Thu Feb 22 15:30:18 CET 2001


Hi All,

I have a question/problem. I want to use one instance of OpenCms for
multiple sites (for example when my company is running two different web
sites) instead of having to install it twice.

What I have done until now is I create a directory within OpenCms per
company, ie: companyA and companyB so it can be called like this:

http://localhost/servlet/opencms/companyA/index.html and
http://localhost/servlet/opencms/companyB/index.html

The next step is to get the appropriate host name to be displayed instead of
localhost. I do this with Apache's Rewrite Module as follows:

<VirtualHost 127.0.0.1>
    DocumentRoot d:/Apache/Apache/sites/companyA
    ServerName www.companya.ch
    RewriteEngine on
    RewriteRule ^(.*) /servlet/opencms/companyA$1 [R]
</VirtualHost>

This does a redirect for me to the appropriate URL, ie:
http://www.companyA.ch/servlet/opencms/companyA/index.html

This works, as does logging into OpenCms with
.../system/workplace/action/login.html

ONLY, the OpenCms images (such as the OpenCms logo on the login screen) are
not being displayed correctly as they are being trapped by the above rewrite
rule and being sent off to the wrong location.

Has anyone done this sort of thing successfully and know how to solve this?
Or is there another way around this?

Thanks in advance,


Simon Wilks
Software Engineer
simon.wilks at silion.ch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
silion (switzerland) ag    software engineering
spinnereistrasse 8              9008 st. gallen
tel 0878 80 90 60             fax 0878 80 90 30
info at silion.ch                    www.silion.ch

a member of the Penta Group   www.pentagroup.ch





More information about the opencms-dev mailing list