[daisy] daisywiki prefix configuration out of DAISY_HOME
Tom Brusselle
tb at schaubroeck.be
Wed Mar 19 12:15:16 CET 2008
The daisy is made publicly available on 2 adresses:
- http://www.blah.com/ for public visitors, login not possible
- https://ourhostname.com/blah.com for editors who log in
The reason we chose for this setup was to avoid editor logins on the
website over plain http. Because we have to pay for each hostname for
wich we want a https certificate, we have to mount all daisies on one
https hostname with a unique prefix . But for the public website, the
daisy also has to be available without the ugly prefix.
The webserver that runs at these hostnames is apache, apache forwards
all requests to daisy, at the same urlprefix (only the hostname is
different)
We tried rewriting the url in apache, but that doesn't work. Apache
can't rewrite all url's inside the pages generated by daisy, so the
client ends up with pages with links that don't work.
So daisy itself needs to know about the 2 different prefixes it is
mounted on on the public hosts.
Right now, the possibilities are:
- run 2 different jetty daisywiki instances for the 2 different url
prefixes, but this would about double the amount of memory needed for
the daisywikis.
- have a different daisy_home on disk for every daisy, configure the
prefixes in sitemap.xmap, that allows us to run the same daisy in 1
daisywiki instance on 2 different prefixes. i think this one is
preferable to us.
hence it would have been nice to put sitemap.xmap in the wikidata dir,
but i guess we just asked for trouble with our setup...
regards,
Tom Brusselle
Karel Vervaeke wrote:
> The approach you describe would start two daisy-wiki webapp instances
> with the same configuration (using the same wikidata directory, the same
> daisy.xconf file and hence the same clientId to connect to the JMS -
> that is where the error comes from).
>
> Perhaps you are trying to achieve something which is better solved using
> other techniques. Do you really need to run two daisy-wiki instances on
> one machine or do you just want to make sure people do not hit 404
> pages? In the latter case consider a setup where people's browsers
> redirected.
>
> HTH,
> Karel
>
> On Tue, 2008-03-18 at 17:08 +0100, Tom Brusselle wrote:
>> Hi,
>>
>> Thanks for the reply.
>>
>> You wouldn't by any chance know how to configure jetty to mount the
>> webapp at "/" and at the same time at /jabjab ?
>>
>> My current configuration in DAISY_HOME/daisywiki/webapp/sitemap.xmap
>> that works is this:
>>
>> ...
>> <map:pipeline>
>> <map:match pattern="jabjab/**">
>> <map:mount uri-prefix="jabjab/" check-reload="yes" src="daisy/"/>
>> </map:match>
>> <!-- send all other URL's also to daisy (but without the prefix)-->
>> <map:mount check-reload="yes" src="daisy/" uri-prefix=""/>
>> ...
>>
>>
>> To try and configure this in jetty-daisywiki.xml, I tried adding an
>> extra item-element but this doesn't work. It gives the following error
>> in cocoon.log: javax.jms.InvalidClientIDException: Broker: DaisyJMS -
>> Client: daisy-wiki already connected
>> This is my attempt:
>>
>> <Set name="handler">
>> <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
>> <Set name="handlers">
>> <Array type="org.mortbay.jetty.Handler">
>> <Item>
>> <New class="org.mortbay.jetty.webapp.WebAppContext">
>> <Arg><SystemProperty name="daisywiki.home"/>/webapp</Arg>
>> <Arg>/jabjab</Arg>
>> <Set name="defaultsDescriptor"><SystemProperty
>> name="daisywiki.home"/>/conf/jetty-daisywiki-defaults.xml</Set>
>> </New>
>> </Item>
>> <!--extra item?-->
>> <Item>
>> <New class="org.mortbay.jetty.webapp.WebAppContext">
>> <Arg><SystemProperty name="daisywiki.home"/>/webapp</Arg>
>> <Arg>/jubjub</Arg>
>> <Set name="defaultsDescriptor"><SystemProperty
>> name="daisywiki.home"/>/conf/jetty-daisywiki-defaults.xml</Set>
>> </New>
>> </Item>
>> <!-- extra item-->
>> <Item>
>> <New id="DefaultHandler"
>> class="org.mortbay.jetty.handler.DefaultHandler"/>
>> </Item>
>> <Item>
>> <New id="RequestLog"
>> class="org.mortbay.jetty.handler.RequestLogHandler"/>
>> </Item>
>> </Array>
>> </Set>
>> </New>
>> </Set>
>>
>>
>>
>>
>> Anyway, if you would happen to know how to do this in
>> jetty-daisywiki.xml, please let me know. If not, thanks for the
>> suggestion anyway.
>>
>> regards,
>>
>> Tom Brusselle
>>
>>
>>
>> Paul Focke wrote:
>>> Hi
>>>
>>> You could of course configure jetty to mount daisy where you want.
>>> Copy <DAISY_HOME>/daisywiki/conf/jetty-daisywiki.xml to <WIKIDATA_DIR>.
>>> Now edit that file so that instead of having daisy mounted at / you have
>>> it mounted at /jubjub.
>>>
>>> <Set name="handler">
>>> <New id="Handlers"
>>> class="org.mortbay.jetty.handler.HandlerCollection">
>>> <Set name="handlers">
>>> <Array type="org.mortbay.jetty.Handler">
>>> <Item>
>>> <New class="org.mortbay.jetty.webapp.WebAppContext">
>>> <Arg><SystemProperty name="daisywiki.home"/>/webapp</Arg>
>>> <!-- The Daisy mountpoint -->
>>> <Arg>/jubjub</Arg>
>>> <Set name="defaultsDescriptor"><SystemProperty
>>> name="daisywiki.home"/>/conf/jetty-daisywiki-defaults.xml</Set>
>>> </New>
>>> </Item>
>>> <Item>
>>> <New id="DefaultHandler"
>>> class="org.mortbay.jetty.handler.DefaultHandler"/>
>>> </Item>
>>> <Item>
>>> <New id="RequestLog"
>>> class="org.mortbay.jetty.handler.RequestLogHandler"/>
>>> </Item>
>>> </Array>
>>> </Set>
>>> </New>
>>> </Set>
>>>
>>> If you are using the service wrappers make sure that you have a look in
>>> the wiki service script configuration in <WIKIDATA_DIR>. There you will
>>> see some instructions on how to point to your custom jetty
>>> configuration.
>>>
>>> Paul
>>>
>>>
>>> On Tue, 2008-03-18 at 09:26 +0100, Tom Brusselle wrote:
>>>> Hi,
>>>>
>>>> We would like to run several daisy instances on one machine. No problem
>>>> so far, just change the ports. (nicely explained in the docs)
>>>> Thanks to the separation of application files and data/config files, we
>>>> can just point the DAISY_HOME of every instance to the same place so we
>>>> don't have to duplicate the DAISY_HOME directory and we can save space.
>>>> Very nice so far.
>>>>
>>>> But here comes the problem: Each of these daisies has to run with a
>>>> different prefix. (actually, each daisy has to run at "/" and at
>>>> "/someprefix"). This is possible by editing the file
>>>> DAISY_HOME/daisywiki/webapp/sitemap.xmap . But this file with
>>>> daisy-instance-specific configuration is located in the general
>>>> DAISY_HOME directory.
>>>>
>>>> Is it possible to put the sitemap.xmap file in the wikidata dir? Or is
>>>> there another way to configure different daisywiki instances that run on
>>>> the same DAISY_HOME dir to have different prefix configurations?
>>>>
>>>> regards,
>>>>
>>>> Tom Brusselle
>>>>
>>>>
>>>> **** DISCLAIMER ****
>>>> http://www.schaubroeck.be/maildisclaimer.htm
>>>> _______________________________________________
>>>> daisy community mailing list
>>>> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
>>>> mail to: daisy at lists.cocoondev.org
>>>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>>> _______________________________________________
>>> daisy community mailing list
>>> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
>>> mail to: daisy at lists.cocoondev.org
>>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>>>
>> **** DISCLAIMER ****
>> http://www.schaubroeck.be/maildisclaimer.htm
>> _______________________________________________
>> daisy community mailing list
>> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
>> mail to: daisy at lists.cocoondev.org
>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>
**** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm
More information about the daisy
mailing list