[opencms-dev] (more details) problems with configuring multiple hosts

Paul-Inge Flakstad flakstad at npolar.no
Tue Jun 23 19:11:14 CEST 2009


Hi again Per-Olof

I'm certainly no expert, but your lines "When i go to www.not-default.nu opencms and apache do as supposed" and "When I do the same operation, while going direct to tomcat (i.e. port 8080) it works as intended" are tell-tell signs that something needs fixing in your Apache config. You'll have to look up your setup tutorial again, and check to make sure you've followed every step exactly as described.

Also, like Christoph pointed out, you should make sure your rfs-/vfs-prefix values in your ${TOMCAT_HOME}/webapps/ROOT/WEB-INF/config/opencms-system.xml are correct, according to the tutorial you've followed.

Again, I would strongly recommend having a look at the alternative setup suggested by Sebastian Himberger. It's only a few simple steps, and it works like a charm. Of all the different setups I've tried, It's the easiest one.

Best of luck to you, hope you figure it out.
-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: 23. juni 2009 14:24
Til: The OpenCms mailing list
Emne: Re: [opencms-dev] (more details) problems with configuring multiple hosts

Paul-Inge Flakstad wrote:
> 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/
>

I described my problem with to few words, but the assumption was correct.


I actually have two problems that I think are related.

Problem 1
If I go to not-default.nu and look in the source I find a css link
pointing to:
/opencms/system/modules/com.alkacon.documentation.howto_template/resources/mystyle.css

and when I go to
not-default.nu/opencms/system/modules/com.alkacon.documentation.howto_template/resources/mystyle.css
(domain + css-link) some redirection is made and I get this url:
www.not-default.nusystem/modules/com.alkacon.documentation.howto_template/resources/mystyle.css


not-default.nu/opencms/system/modules/com.alkacon.documentation.howto_template/resources/mystyle.css

In my httpd.conf I have:

    ServerName www.not-default.nu
    ServerAlias not-default.nu
    RedirectPermanent /opencms/         http://www.not-default.nu/


As you can see I go to the serveralias with my request, and I assume
that apache do some kind of redirect and looses the first slash in the
path while doing it. When i go to www.not-default.nu opencms and apache
do as supposed.


Problem 2
When I click "Direct Edit" on a page while surfing (we only have the
default site about opencms) a window pops up (good) and also a
javascript alert that tells me "Not enough permissions to execute the
operation on the resource "null". Required permissions are: "+w".

In opencms.log an exception is recorded:
23 jun 2009 14:08:37,445 ERROR [ace.editors.CmsPreEditorAction: 169]
Error reading resource from path "null".
org.opencms.file.CmsVfsException: Error reading resource from path "null".
        at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:242)
        at org.opencms.db.CmsDbContext.report(CmsDbContext.java:212)
        at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4036)
        at org.opencms.file.CmsObject.readResource(CmsObject.java:3529)
        at
org.opencms.workplace.editors.CmsPreEditorAction.doPreAction(CmsPreEditorAction.java:159)
        at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.editor_jsp._jspService(editor_jsp.java:57)

When I do the same operation, while going direct to tomcat (i.e. port
8080) it works as intended.


Any idéas?


Paul, thanks for the tip about the blog entry. I will look in to it when
I giving up on this way of doing multiple hosts.

peace

> 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
>
> _______________________________________________
> 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
>


_______________________________________________
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