[opencms-dev] problems with configuring multiple hosts

Per-Olof Widström per-olof.widstrom at splendid.se
Mon Jun 22 18:21:59 CEST 2009


Hello!

I'm setting up open cms to handle multiple sites, with help from the 
documentation that can be found in the installation, and I have some 
trouble to getting it to work properly.

Open Cms is the root-app (ROOT).

My problem is that links are generated without the first slash. The link 
to the css file looks like this:
 http://www.not-default.nusystem/modules/com.alkacon.documentation.howto_template/resources/mystyle.css

Any suggestions about what to do about this?


Conf-files below


 From httpd.conf
<VirtualHost *:80>
    ServerName default.se
    ServerAdmin webmaster at default.se
    DocumentRoot "/opt/tomcat/webapps/ROOT/"
    ErrorLog logs/default.se-error.log

    # Log only non-redirect requests in "normal" log file
    SetEnvIf Request_URI "\/opencms\/*" redirect
    CustomLog logs/parked.vipfirce.se-access.log common env=!redirect

    ProxyPass         /opencms/                 !
    RedirectPermanent /opencms/                 http://default.se/

    ProxyPass         /resources/               !
    ProxyPass         /export/                  !

    ProxyPass         /                         
http://127.0.0.1:8080/opencms/
    ProxyPassReverse  /                         
http://127.0.0.1:8080/opencms/
</VirtualHost>
<VirtualHost *:80>
    ServerName www.not-default.nu
    ServerAlias www.not-default.se
    ServerAlias not-default.nu
    ServerAlias not-default.se
    ServerAdmin webmaster at not-default.nu
    DocumentRoot "/opt/tomcat/webapps/ROOT/"
    ErrorLog logs/not-default.nu-error.log


    # Log only non-redirect requests in "normal" log file
    SetEnvIf Request_URI "\/opencms\/*" redirect
    CustomLog logs/not-default.nu-access.log common env=!redirect


    # Multi domain configuration: All pages in "/siteA/" are to be 
served from domain "www.siteA.com"
    ProxyPass         /opencms/                 !
    RedirectPermanent /opencms/                 
http://www.not-default.nu/       



    ProxyPass         /resources/               !
    ProxyPass         /export/                  !

    ProxyPass         /                         
http://127.0.0.1:8082/opencms/
    ProxyPassReverse  /                         
http://127.0.0.1:8082/opencms/
</VirtualHost>



 From server.xml
        <Connector port="8080"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               proxyName="default.se" proxyPort="80"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
        <Connector port="8082"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               proxyName="not-default.nu" proxyPort="80"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />



 From opencms-system.xml
    <sites>
      <workplace-server>http://default.se</workplace-server>
      <default-uri>/sites/default/</default-uri>
      <site server="not-default.nu" uri="/sites/not-default.nu/"/>
      <site server="default.se" uri="/sites/default/" />
    </sites>




More information about the opencms-dev mailing list