1 # Apache configuration settings that are shared for every Koha instance.
2 # This file contains settings that are the same for both the OPAC and
5 # This file should be included from an instance's
6 # /etc/apache2/site-available file, once from the OPAC section, and once
7 # from the intranet section.
10 SetEnv PERL5LIB "/usr/share/koha/lib"
16 mod_gzip_keep_workfiles No
17 mod_gzip_can_negotiate yes
18 mod_gzip_update_static No
19 mod_gzip_temp_dir /tmp
20 mod_gzip_minimum_file_size 512
21 mod_gzip_maximum_file_size 1000000
22 mod_gzip_maximum_inmem_size 1000000
23 mod_gzip_handle_methods GET POST
24 mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
25 mod_gzip_item_exclude mime ^image/.*
26 mod_gzip_item_exclude rspheader Content-Type:image/*
27 mod_gzip_item_include file \.js$
28 mod_gzip_item_include mime ^application/x-javascript$
29 mod_gzip_item_include file \.php$
30 mod_gzip_item_include mime ^text/html$
31 mod_gzip_item_include file \.css$
32 mod_gzip_item_include mime ^text/css$
36 <IfModule mod_deflate.c>
37 # Compress content with type html, text, and css, ...
38 AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
39 AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
41 DeflateCompressionLevel 9
43 # Properly handle old browsers that do not support compression
44 BrowserMatch ^Mozilla/4 gzip-only-text/html
45 BrowserMatch ^Mozilla/4\.0[678] no-gzip
46 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
48 DeflateFilterNote Input instream
49 DeflateFilterNote Output outstream
50 DeflateFilterNote Ratio ratio
52 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
53 <IfModule mod_headers.c>
54 #properly handle requests coming from behind proxies
55 Header append Vary User-Agent
59 <IfModule mod_expires.c>
61 ExpiresByType text/css "access plus 12 hours"
62 ExpiresByType application/javascript "access plus 12 hours"
63 ExpiresByType image/png "access plus 12 hours"
64 ExpiresByType image/gif "access plus 12 hours"
67 Options +FollowSymLinks -Indexes
70 ErrorDocument 400 /cgi-bin/koha/errors/400.pl
71 ErrorDocument 401 /cgi-bin/koha/errors/401.pl
72 ErrorDocument 403 /cgi-bin/koha/errors/403.pl
73 ErrorDocument 404 /cgi-bin/koha/errors/404.pl
74 ErrorDocument 500 /cgi-bin/koha/errors/500.pl