Koha/debian/templates
David Cook 9fdceaa3b5 Bug 26048: Use ErrorDocument middleware for Plack HTTP errors
This patch uses the ErrorDocument middleware to use Koha's
custom error pages instead of generic Plack error responses

Test plan:
0. Apply patch
1. vi /usr/sbin/koha-plack (and change "development" to "deployment")
2. vi ./opac/opac-main.pl
3. Add "die" to line 2
4. vi ./mainpage.pl
5. Add "die" to line 2
6. cp ./debian/templates/plack.psgi /etc/koha/sites/kohadev/plack.psgi
7. koha-plack --restart kohadev
8. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
9. See a beautiful OPAC 500 error instead of "Internal Server Error"
10. Go to http://localhost:8080/cgi-bin/koha/blah.pl
11. See a beautiful OPAC 404 error instead of "not found"
12. Go to http://localhost:8081/cgi-bin/koha/mainpage.pl
13. See a beautiful Staff interface 500 error instead of "Internal Server Error"
14. Go to http://localhost:8081/cgi-bin/koha/blah.pl
15. See a beautiful Staff interface 404 error instead of "not found"

For bonus points:
16. koha-plack --disable kohadev
17. koha-plack --stop kohadev
18. service apache restart
19. Repeat the above test plan to show CGI still works for 404 (although 500
will show "Software Error" due to C4::Context needing some improvements)
20. Using the "Network" tab on your developer tools, make sure 404 and 500
are returned by the appropriate error pages

Signed-off-by: Eden Bacani <eden.bacani@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-27 10:30:43 +01:00
..
apache-shared-disable.conf
apache-shared-intranet-plack.conf Bug 8437: Exclude export.pl from plack 2020-10-26 00:04:18 +01:00
apache-shared-intranet.conf Bug 25548: Remove Apache rewrite directives that trigger redirects 2020-11-20 14:23:52 +01:00
apache-shared-opac-plack.conf Bug 21267: Set X-FORWARDED-PROTO https if required 2018-08-31 12:46:58 +00:00
apache-shared-opac.conf Bug 25548: Remove Apache rewrite directives that trigger redirects 2020-11-20 14:23:52 +01:00
apache-shared.conf
apache-site-https.conf.in Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files 2020-05-05 10:59:03 +01:00
apache-site.conf.in Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files 2020-05-05 10:59:03 +01:00
koha-common.conf
koha-conf-site.xml.in Bug 24633: (follow-up) Tweak sample plugin targets 2020-11-06 15:55:17 +01:00
koha-core.conf Bug 26672: Add additional koha-core and koha-full files to ./debian 2020-11-25 16:18:03 +01:00
koha-sites.conf Bug 25149: Fix Zebra language code for Greek 2020-04-29 17:14:30 +01:00
log4perl-site.conf.in Bug 16357: Use separate Log4Perl logger for each Plack app 2020-09-28 16:09:10 +02:00
marc21-retrieval-info-auth-dom.xml
marc21-retrieval-info-bib-dom.xml Bug 17871: (followup) Remove zebra::* from the packages templates 2017-02-07 17:50:42 +00:00
normarc-retrieval-info-auth-dom.xml
normarc-retrieval-info-bib-dom.xml Bug 17871: (followup) Remove zebra::* from the packages templates 2017-02-07 17:50:42 +00:00
plack.psgi Bug 26048: Use ErrorDocument middleware for Plack HTTP errors 2021-01-27 10:30:43 +01:00
SIPconfig.xml Bug 25761: (QA follow-up) Consistent flag names 2020-11-16 13:45:07 +01:00
unimarc-retrieval-info-auth-dom.xml
unimarc-retrieval-info-bib-dom.xml Bug 17871: (followup) Remove zebra::* from the packages templates 2017-02-07 17:50:42 +00:00
zebra-authorities-dom-site.cfg.in
zebra-biblios-dom-site.cfg.in
zebra.passwd.in