Bug 11404: add support for Apache 2.4's config file convention
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 16 Dec 2013 17:32:40 +0000 (14:32 -0300)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 19 May 2014 21:47:03 +0000 (21:47 +0000)
commit7ec644da06382eb0018a3fad88ef61b35a05e2aa
treea2816962a5d4f0e5888c2327c7780eb413007d6f
parent9d9c413c42dc124c7ef26c779c2c0758b4735ae4
Bug 11404: add support for Apache 2.4's config file convention

Apache 2.4 expects the sites definition files use the sufix '.conf'

To reproduce:
- Install the 'koha-common' package on Debian 7 or Ubuntu 13.10+
  (both known to include Apache 2.4).
- Create an instance (for example testlibrary) using the supplied
  commands:
 $ koha-create --create-db testlibrary
> FAIL: apache reports an error like this:
"ERROR: Site testlibrary does not exist!"

This patch adds a test on the Apache version and appends the ".conf"
sufix if needed.

To test:

1st step: koha-create gets fixed:

-- The hard way --
- Apply the patch, and build the koha-common package on top of this
  commit.
- Install the built package on an Apache 2.4 Debian-based distro (Debian 7
  or Ubuntu 13.10 will work)
- Create a test instance:
 $ koha-create --create-db testlibrary
> SUCCESS: no more apache sites related error.

-- The easy way --
- Apply the patch, and copy the koha-create into an Apache 2.4
  Debian-based distro
- Create a test instance using the koha-create script you just
  copied:
 $ ./koha-create --create-db testlibrary
> SUCCESS: no more apache sites related error.

2nd step: the rest of the touched scripts keep working as usual

koha-disable
koha-dump
koha-enable
koha-list
koha-remove
koha-restart-zebra
koha-stop-zebra
koha-start-zebra

They should all keep working. Can be tested "the easy way" too.

Note: there might be another issues regarding Apache 2.4 deployments
like the need for

 $ a2enmod access_compat

and perhaps some directory permissions tweak, which I think should be
properly documented on the install instructions.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
debian/scripts/koha-create
debian/scripts/koha-disable
debian/scripts/koha-dump
debian/scripts/koha-enable
debian/scripts/koha-list
debian/scripts/koha-remove
debian/scripts/koha-restart-zebra
debian/scripts/koha-start-zebra
debian/scripts/koha-stop-zebra