AW: [opencms-dev] OpenCms for Muliple Sites?
Simon Wilks
simon.wilks at silion.ch
Thu Feb 22 15:41:51 CET 2001
Me again,
Well, I tried this all afternoon and couldn't work it out. Sent it to this
list and 10 seconds later I solved it!!! Typical.
For those who are interested here is the answer:
Add the following line before the existing rewrite rule. The localhost may
be replaced by whereever your OpenCms images are kept.
RewriteRule ^/pics/(.*) http://localhost/pics/$1 [R,L]
Would still like to know if anyone else has any ideas/experience on
"multiple sites" with OpenCms.
Regards,
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
> -----Ursprüngliche Nachricht-----
> Von: owner-opencms-dev at www.opencms.com
> [mailto:owner-opencms-dev at www.opencms.com]Im Auftrag von Simon Wilks
> Gesendet: Donnerstag, 22. Februar 2001 15:30
> An: opencms-dev at opencms.com
> Betreff: [opencms-dev] OpenCms for Muliple Sites?
>
>
> 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