Koha/debian/templates/apache-site.conf.in
Tomas Cohen Arazi 4182a08052 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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-24 13:00:40 -03:00

43 lines
1.5 KiB
Text

# Koha instance __KOHASITE__ Apache config.
# 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__
SetEnv KOHA_CONF "/etc/koha/sites/__KOHASITE__/koha-conf.xml"
SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
AssignUserID __UNIXUSER__ __UNIXGROUP__
ErrorLog /var/log/koha/__KOHASITE__/opac-error.log
# TransferLog /var/log/koha/__KOHASITE__/opac-access.log
# RewriteLog /var/log/koha/__KOHASITE__/opac-rewrite.log
</VirtualHost>
# 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__
SetEnv KOHA_CONF "/etc/koha/sites/__KOHASITE__/koha-conf.xml"
SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
AssignUserID __UNIXUSER__ __UNIXGROUP__
ErrorLog /var/log/koha/__KOHASITE__/intranet-error.log
# TransferLog /var/log/koha/__KOHASITE__/intranet-access.log
# RewriteLog /var/log/koha/__KOHASITE__/intranet-rewrite.log
</VirtualHost>