Bugzilla – Attachment 43443 Details for
Bug 15005
(Plack) Use of SCRIPT_NAME makes Koha generate wrong URIs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15005: Use ReverseProxyPath on plack.psgi
Bug-15005-Use-ReverseProxyPath-on-plackpsgi.patch (text/plain), 2.29 KB, created by
Tomás Cohen Arazi (tcohen)
on 2015-10-15 18:06:54 UTC
(
hide
)
Description:
Bug 15005: Use ReverseProxyPath on plack.psgi
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2015-10-15 18:06:54 UTC
Size:
2.29 KB
patch
obsolete
>From 2492d352b0a4221f21161bbe93b4af927b910161 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 15 Oct 2015 14:59:28 -0300 >Subject: [PATCH] Bug 15005: Use ReverseProxyPath on plack.psgi > >This patch makes plack.psgi use ReverseProxyPath so %ENV{SCRIPT_NAME} is >correctly set when running Koha behind a reverse proxy that changes >the URI path (which is done on the Plack integration into packages). > >The apache includes for plack are tweaked so the needed headers are set >before passing the request to the Plack backend. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > debian/templates/apache-shared-intranet-plack.conf | 1 + > debian/templates/apache-shared-opac-plack.conf | 1 + > debian/templates/plack.psgi | 1 + > 3 files changed, 3 insertions(+) > >diff --git a/debian/templates/apache-shared-intranet-plack.conf b/debian/templates/apache-shared-intranet-plack.conf >index 65a34a2..a5e1fb9 100644 >--- a/debian/templates/apache-shared-intranet-plack.conf >+++ b/debian/templates/apache-shared-intranet-plack.conf >@@ -12,6 +12,7 @@ > ProxyPreserveHost On > > # RequestHeader set X-FORWARDED-PROTO "https" >+ RequestHeader set "X-Forwarded-Script-Name" /cgi-bin/koha > > #Â Point the intranet site to Plack > ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet" >diff --git a/debian/templates/apache-shared-opac-plack.conf b/debian/templates/apache-shared-opac-plack.conf >index 95787d8..1c2633a 100644 >--- a/debian/templates/apache-shared-opac-plack.conf >+++ b/debian/templates/apache-shared-opac-plack.conf >@@ -12,6 +12,7 @@ > ProxyPreserveHost On > > # RequestHeader set X-FORWARDED-PROTO "https" >+ RequestHeader set "X-Forwarded-Script-Name" /cgi-bin/koha > > #Â Point the intranet site to Plack > ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" >diff --git a/debian/templates/plack.psgi b/debian/templates/plack.psgi >index 6da039f..30f4f0b 100644 >--- a/debian/templates/plack.psgi >+++ b/debian/templates/plack.psgi >@@ -65,6 +65,7 @@ my $opac = Plack::App::CGIBin->new( > builder { > > enable "ReverseProxy"; >+ enable "ReverseProxyPath"; > enable "Plack::Middleware::Static"; > > mount '/opac' => $opac; >-- >2.6.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15005
:
43383
|
43387
|
43388
|
43389
|
43443
|
43444
|
43447
|
43448
|
43449
|
43451
|
43452
|
43453
|
43454
|
43455
|
43484
|
43534
|
43535
|
43536
|
43537