1 # Apache configuration settings that are shared for every Koha instance.
2 # This file contains settings for the OPAC site.
4 # This file should be included from an instance's
5 # /etc/apache2/site-available file, from within the VirtualHost section
8 DocumentRoot /usr/share/koha/opac/htdocs
10 ScriptAlias /cgi-bin/koha/ "/usr/share/koha/opac/cgi-bin/opac/"
11 ScriptAlias /index.html "/usr/share/koha/opac/cgi-bin/opac/opac-main.pl"
12 ScriptAlias /search "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
13 ScriptAlias /opac-search.pl "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
15 RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
16 RewriteRule (.+) $1?%1%2 [N,R,NE]
17 RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
18 RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
19 RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
22 AliasMatch "^/sitemap(.*)" "/var/lib/koha/${instance}/sitemap/sitemap$1"
23 <Directory "/var/lib/koha/${instance}/sitemap">
28 Alias "/api" "/usr/share/koha/api"
29 <Directory "/usr/share/koha/api">
30 Options +ExecCGI +FollowSymlinks
31 AddHandler cgi-script .pl
33 SetEnv MOJO_MODE "production"
36 RewriteCond %{REQUEST_FILENAME} !-f
37 RewriteCond %{REQUEST_FILENAME} !-d
38 RewriteCond %{DOCUMENT_ROOT}/../api/$1/app.pl -f
39 RewriteRule ^(.*?)/.* $1/app.pl/api/$0 [L]