[opencms-dev] problems with configuring multiple hosts

Paul-Inge Flakstad flakstad at npolar.no
Mon Jun 22 18:47:34 CEST 2009


Hi Per-Olof

The link you provided is absolute, so I don't get exactly what you mean by "links are generated without the first slash". I suppose your system generates link/path.html instead of /link/path.html? On this issue, I can't help you (though I'm sure someone else can).

However, in our environment, we run several servers - all with multiple sites - and have found that the best solution for us is the one provided by Sebastian Himberger. Have a look at his blog  for further details: http://www.sebastian.himberger.de/blog/2009/03/11/opencms-apache-integration-the-simplest-solution/

Cheers,
Paul
________________________________________
Fra: opencms-dev-bounces at opencms.org [opencms-dev-bounces at opencms.org] på vegne av Per-Olof Widström [per-olof.widstrom at splendid.se]
Sendt: 22. juni 2009 18:21
Til: opencms-dev at opencms.org
Emne: [opencms-dev] problems with configuring multiple hosts

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>


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list