Bugzilla – Attachment 41749 Details for
Bug 13791
Plack - Out of the box support on packages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13791: Apache configuration files
Bug-13791-Apache-configuration-files.patch (text/plain), 4.54 KB, created by
Jonathan Druart
on 2015-08-21 08:36:38 UTC
(
hide
)
Description:
Bug 13791: Apache configuration files
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-08-21 08:36:38 UTC
Size:
4.54 KB
patch
obsolete
>From d2182f98ffdbd4adb51f2e9ed841cda79bb7bd3a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 13 Aug 2015 14:02:42 -0300 >Subject: [PATCH] Bug 13791: Apache configuration files > >This patch adds an include to each VirtualHost definition (OPAC and Intranet) >and a variable definition, taking advantage of Apache 2.4.x features. > >The instance name is reused inside the includes providing a simple way of >dealing with the apache <-> plack configuration. > >A check for the right apache version is introduced, in the for of an IfVersion block: > ><IfVersion >= 2.4> > --- Plack configuration here --- ></IfVersion> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > debian/templates/apache-shared-intranet-plack.conf | 25 ++++++++++++++++++++++ > debian/templates/apache-shared-opac-plack.conf | 25 ++++++++++++++++++++++ > debian/templates/apache-site.conf.in | 8 +++++++ > 3 files changed, 58 insertions(+) > create mode 100644 debian/templates/apache-shared-intranet-plack.conf > create mode 100644 debian/templates/apache-shared-opac-plack.conf > >diff --git a/debian/templates/apache-shared-intranet-plack.conf b/debian/templates/apache-shared-intranet-plack.conf >new file mode 100644 >index 0000000..95a68d5 >--- /dev/null >+++ b/debian/templates/apache-shared-intranet-plack.conf >@@ -0,0 +1,25 @@ >+# Apache configuration settings that are shared for every Koha instance. >+# This file contains settings for the Plack configuration of the intranet. >+# >+# This file should be included from an instance's >+# /etc/apache2/site-available file, from within the VirtualHost section >+# for the intranet. >+ >+#Â Plack is only available out-of-the-box for Apache 2.4.7+ setups >+<IfVersion >= 2.4> >+ <IfModule mod_proxy_http.c> >+ >+ ProxyPreserveHost On >+ >+ # RequestHeader set X-FORWARDED-PROTO "https" >+ >+ #Â Point the intranet site to Plack >+ ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet" >+ ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet" >+ >+ #Â Point the /api endpoint to Plack >+ # ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api" >+ # ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api" >+ >+ </IfModule> >+</IfVersion> >diff --git a/debian/templates/apache-shared-opac-plack.conf b/debian/templates/apache-shared-opac-plack.conf >new file mode 100644 >index 0000000..5d6f564 >--- /dev/null >+++ b/debian/templates/apache-shared-opac-plack.conf >@@ -0,0 +1,25 @@ >+# Apache configuration settings that are shared for every Koha instance. >+# This file contains settings for the Plack configuration of the OPAC. >+# >+# This file should be included from an instance's >+# /etc/apache2/site-available file, from within the VirtualHost section >+# for the OPAC. >+ >+#Â Plack is only available out-of-the-box for Apache 2.4.7+ setups >+<IfVersion >= 2.4> >+ <IfModule mod_proxy_http.c> >+ >+ ProxyPreserveHost On >+ >+ # RequestHeader set X-FORWARDED-PROTO "https" >+ >+ #Â Point the intranet site to Plack >+ ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" >+ ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" >+ >+ #Â Point the /api endpoint to Plack >+ # ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api" >+ # ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api" >+ >+ </IfModule> >+</IfVersion> >diff --git a/debian/templates/apache-site.conf.in b/debian/templates/apache-site.conf.in >index dd30bc6..3f7ad52 100644 >--- a/debian/templates/apache-site.conf.in >+++ b/debian/templates/apache-site.conf.in >@@ -2,8 +2,12 @@ > > # OPAC > <VirtualHost *:__OPACPORT__> >+ <IfVersion >= 2.4> >+ Define instance "__KOHASITE__" >+ </IfVersion> > Include /etc/koha/apache-shared.conf > # Include /etc/koha/apache-shared-disable.conf >+# Include /etc/koha/apache-shared-opac-plack.conf > Include /etc/koha/apache-shared-opac.conf > > ServerName __OPACSERVER__ >@@ -19,8 +23,12 @@ > > # Intranet > <VirtualHost *:__INTRAPORT__> >+ <IfVersion >= 2.4> >+ Define instance "__KOHASITE__" >+ </IfVersion> > Include /etc/koha/apache-shared.conf > # Include /etc/koha/apache-shared-disable.conf >+# Include /etc/koha/apache-shared-intranet-plack.conf > Include /etc/koha/apache-shared-intranet.conf > > ServerName __INTRASERVER__ >-- >2.1.0
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 13791
:
41481
|
41482
|
41483
|
41484
|
41485
|
41486
|
41503
|
41504
|
41505
|
41506
|
41507
|
41508
|
41509
|
41510
|
41511
|
41512
|
41513
|
41563
|
41564
|
41565
|
41566
|
41567
|
41568
|
41571
|
41572
|
41573
|
41574
|
41575
|
41576
|
41748
| 41749 |
41750
|
41751
|
41752
|
41753
|
41866
|
42038