[Koha-devel] Apache 2.4 env vars

Paul A paul.a at navalmarinearchive.com
Thu Jan 15 01:49:32 CET 2015


At 07:01 PM 1/14/2015 -0500, Mark Tompsett wrote:
>Greetings,
>
>1) Why not just set the OPACBaseURL system preference in the first place?!

Thanks Mark -- the reason that I was asking was that (at this point) I'm 
only testing, and didn't want to hardcode a LAN URL (1)  Koha seemed to 
have the capability to get it from the [Apache] %ENV, so I was *trying* 
that route.

The Apache documentation for 2.4 suggests at 
<http://httpd.apache.org/docs/current/mod/core.html#servername> that 
ServerName serves this purpose and that SERVER_NAME is associated with 
UseCanonicalName, and at 
<http://httpd.apache.org/docs/current/mod/mod_rewrite.html> suggests its 
use with mod-rewrite.

So rather than re-invent the wheel, I thought I'd ask.

Again thanks and best regards,
Paul
(1) We don't use the syspref on our production servers either. ISTR that 
rather than our staff and users on our premises having direct access on the 
LAN, we got the latency effect of going through public routing and back 
into our building again.  I don't think it makes any difference to www users.


>If you do (1 ), then you don't have to do (2 ), but if you are crazy, 
>paranoid go ahead:
>2) /etc/apache2/sites-enabled/koha.conf (or whatever your instance name is)
>    a) Look for KOHA_CONF and create the appropriate entries for 
> SERVER_NAME and SERVER_PORT
>        For example (yours may differ):
>            SetEnv SERVER_NAME library.myDNSname.org
>            SetEnv SERVER_PORT 80 # because this should match the block it 
> is in.
>    b) Do step (a ) TWICE (because OPAC and Staff are both in the same 
> configuration file).
>
>GPML,
>Mark Tompsett

---
Maritime heritage and history, preservation and conservation,
research and education through the written word and the arts.
<http://NavalMarineArchive.com> and <http://UltraMarine.ca>



More information about the Koha-devel mailing list