[opencms-dev] adding a /sites/mysite

Michael Emmerich m.emmerich at alkacon.com
Thu Dec 1 13:02:27 CET 2005


Christoph,

> I tried from various recipes I found but to no avail,
> to add a /sites/mysite to have a clean playground to start with.
> 
> Last I tried was adding a line in opencms-system.xml:
> 
> <sites>
>         <workplace-server>http://localhost:8080</workplace-server>
>         <default-uri>/sites/default/</default-uri>
>         <site server="http://localhost:8080" uri="/sites/default/"/>
>         <site server="http://localhost:8080" uri="/sites/mysite/"/>
> </sites>
> 
> This already looks strange (the same server http://localhost:8080 entries)
> but I have no idea how to do it right.

You are almost right here.
Try to do this

<site server="http://localhost:8081" uri="/sites/mysite/"/>

And add an additional connector listening on port 8081 in your tomcat 
configuration.


The site configuration tells the OpenCms:
Everything that is coming via http://localhost:8080 is directed into 
/sites/default/.
Everything that is coming via http://localhost:8081 is directed into 
/sites/mysite/.

Using a defualt OpenCms installation, this means that

http://localhost:8080/opencms/opencms/index.html
will access the file /sites/default/index.html

while

http://localhost:8081/opencms/opencms/index.html
will access the file /sites/mysite/index.html

As you are using an Apache in front of your tomcat, you can add 
diffenert vitual hosts, pointing to the different sites.

> "Well, you have to create a directory "/sites/www.mysite/" in the VFS and fill 
> it with whatever you need for your site."
> 
> How does one do this, "create a directory /sites/www.mysite"?

For you configuration above, switch to the Root site ("/") in OpenCms 
and create a folder "mysite" in the folder "sites".

> Oh man, opencms is complicated. Sigh. 

Hmm, I would say this is pretty simple. :)
If I remember right, there should be a documentation module in the 
OpenCms distribution about that as well.

Regards,
Michael Emmerich

Alkacon Software - The OpenCms Experts



More information about the opencms-dev mailing list