Hi Michael This won't work with Plack, because the environment variables set in Apache are not passed through to Plack. This still works fine without Plack as the env variables are set for the scripts running under the apache user. Someone needs to work on a way to pass the variables to plack. Environment ones won't work, because plack is persistent, they will need to be set in config or something. If you want to discuss ideas for doing this, we could move it to the koha-devel list. Chris On 08/02/17 05:50, Michael Kuhn wrote:
Hi Zeno
Is it possible to have just one Koha database but more than one OPAC interface that is accessing the data?
in my opinion the best option is many OPAC Virtual Hosts with different DNS CNAME each. In every VH setup you can insert different values for system preferences and you can hve different css, js, etc.
Thanks for your suggestion! I tried to find some information about different values for system preferences in virtual hosts, via Google I found some Bugzilla issues (10325, 16068) and some other hints, but no official description (except one hint in chapter 2.1 of the manual). There seem to exist variables like OPAC_CSS_OVERRIDE etc and also OVERRIDE_SYSPREF_* which seemingly can be extended like OVERRIDE_SYSPREF_opacbookbag for example.
I then configured a new virtual host in my Apache HTTP Server using the standard OPAC configuration for port 80, but changing the port to 1080. After that my OPAC is actually accessible via port 80 as well as 1080.
Then (as an example) I added the variable OVERRIDE_SYSPREF_opacbookbag, so the configuration of the virtual host now looks as follows
<VirtualHost *:1080> <IfVersion >= 2.4> Define instance "svk" </IfVersion> Include /etc/koha/apache-shared.conf Include /etc/koha/apache-shared-opac-plack.conf Include /etc/koha/apache-shared-opac.conf
ServerName svk SetEnv KOHA_CONF "/etc/koha/sites/svk/koha-conf.xml" SetEnv MEMCACHED_SERVERS "" SetEnv MEMCACHED_NAMESPACE "" AssignUserID svk-koha svk-koha
SetEnv OVERRIDE_SYSPREF_opacbookbag 0
ErrorLog /var/log/koha/svk/opac-error.log </VirtualHost>
I then restarted the Apache HTTP Server and also Plack - but there was no visible change in the new OPAC (usually "opacbookbag" should hide or show the Cart symbol). In fact I made many more experiments, but I guess one example is enough here.
I'm not sure if I'm doing the right thing anyway... Can you maybe point me to some documentation about the correct changing of values for system preferences?
Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha