Koha/debian/templates
Tomas Cohen Arazi e4bb70a447 Bug 17030: Make REST api available on packages with plack enabled
This patch is the starting point for making the REST api available
on Plack.

What it does:
- It creates the /api/v1/app.pl mount point in plack.psgi
- It enables the ProxyPass and ProxyPassReverse directives so it
  is reached through Plack.
- It sets rewrite rules so we can use the 'pretty' urls (i.e.
  /api/v1/patrons instead of /api/v1/app.pl/api/v1/patrons).

To test:
- Grab the following files, and put them in /etc/koha (overwrite the existing ones)
  debian/templates/apache-shared-intranet-plack.conf
  debian/templates/apache-shared-opac-plack.conf
- Tweak your /etc/koha/sites/kohadev/plack.psgi file so the API-related stuff
  is present on your file.
- Make sure Plack is enabled for the instance:
  $ sudo koha-plack --enable kohadev
  $ sudo koha-plack --restart kohadev
  $ sudo service apache2 restart
- Follow the previous patch test plan, but use this URLs (no pretty URL):

  http://localhost:8080/api/v1/app.pl/api/v1/patrons/50
  http://localhost:8081/api/v1/app.pl/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Not use this URLs:
  http://localhost:8080/api/v1/patrons/50
  http://localhost:8081/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Sign off :-D

[1] this patch made a bug visible (the session is lost when accessing the API through
Plack) but it shouldn't prevent its inclusion because the API right now is not even available
as default for developers to test or fix it.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-08 13:17:35 +00:00
..
apache-shared-disable.conf
apache-shared-intranet-plack.conf Bug 17030: Make REST api available on packages with plack enabled 2016-08-08 13:17:35 +00:00
apache-shared-intranet.conf Bug 17030: Enable REST api on packages 2016-08-08 13:17:34 +00:00
apache-shared-opac-plack.conf Bug 17030: Make REST api available on packages with plack enabled 2016-08-08 13:17:35 +00:00
apache-shared-opac.conf Bug 17030: Enable REST api on packages 2016-08-08 13:17:34 +00:00
apache-shared.conf
apache-site-https.conf.in Bug 15303 Letsencrypt option for Debian package installations 2016-04-29 13:04:31 +00:00
apache-site.conf.in Bug 13791: Apache configuration files 2015-08-24 13:00:40 -03:00
koha-common.conf
koha-conf-site.xml.in Bug 16084: [QA Follow-up] Correct three occurrences of __KOHA_CONF_DIR__ 2016-03-25 21:07:54 +00:00
koha-sites.conf Bug 14383: debian: Fix some trivial typos 2015-06-22 17:34:44 -03:00
log4perl-site.conf.in Bug 14167: (QA followup) Add template and changes needed for packages 2015-07-21 10:18:11 -03:00
marc21-retrieval-info-auth-dom.xml
marc21-retrieval-info-auth-grs1.xml
marc21-retrieval-info-bib-dom.xml
marc21-retrieval-info-bib-grs1.xml
normarc-retrieval-info-auth-dom.xml
normarc-retrieval-info-auth-grs1.xml
normarc-retrieval-info-bib-dom.xml
normarc-retrieval-info-bib-grs1.xml
plack.psgi Bug 17030: Make REST api available on packages with plack enabled 2016-08-08 13:17:35 +00:00
SIPconfig.xml
unimarc-retrieval-info-auth-dom.xml
unimarc-retrieval-info-auth-grs1.xml
unimarc-retrieval-info-bib-dom.xml
unimarc-retrieval-info-bib-grs1.xml
zebra-authorities-dom-site.cfg.in Bug 12216: One should be able to override zebra config 2015-08-03 11:59:03 -03:00
zebra-authorities-site.cfg.in Bug 12216: One should be able to override zebra config 2015-08-03 11:59:03 -03:00
zebra-biblios-dom-site.cfg.in Bug 12216: One should be able to override zebra config 2015-08-03 11:59:03 -03:00
zebra-biblios-site.cfg.in Bug 12216: One should be able to override zebra config 2015-08-03 11:59:03 -03:00
zebra.passwd.in