1 # Apache configuration settings that are shared for every Koha instance.
2 # This file contains settings for the Plack configuration of the intranet.
4 # This file should be included from an instance's
5 # /etc/apache2/site-available file, from within the VirtualHost section
8 # Plack is only available out-of-the-box for Apache 2.4.8+ setups
10 <IfModule mod_proxy_http.c>
12 # FIXME: These scripts should be fixed so they
13 # don't break under plack/starman
14 ProxyPass "/cgi-bin/koha/tools/export.pl" "!"
15 ProxyPass "/cgi-bin/koha/tools/upload-cover-image.pl" "!"
16 ProxyPass "/cgi-bin/koha/svc/cataloguing/metasearch" "!"
20 RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS
22 # Point the intranet site to Plack
23 ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet/mainpage.pl"
24 ProxyPassReverse /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet/mainpage.pl"
25 ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet"
26 ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet"
28 # Point the /api endpoint to Plack
29 RewriteCond %{REQUEST_URI} !^/api/v[0-1]+/app.pl
30 RewriteRule ^/api/(v[0-9]+)/(.*)$ /api/$1/app.pl/api/$1/$2 [L,PT]
32 ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
33 ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"