6717 Documenting need_merge_authorities table
[koha.git] / debian / templates / apache-shared.conf
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
3 # the Intranet site.
4 #
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.
8
9
10 SetEnv PERL5LIB "/usr/share/koha/lib"
11
12
13 <IfModule mod_gzip.c>
14     mod_gzip_on yes
15     mod_gzip_dechunk yes
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$
33 </IfModule>
34
35
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
40
41     DeflateCompressionLevel 9
42
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
47
48     DeflateFilterNote Input instream
49     DeflateFilterNote Output outstream
50     DeflateFilterNote Ratio ratio
51
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
56     </IfModule>
57 </IfModule>
58
59
60 Options +FollowSymLinks
61
62
63 ErrorDocument 400 /cgi-bin/koha/errors/400.pl
64 ErrorDocument 401 /cgi-bin/koha/errors/401.pl
65 ErrorDocument 403 /cgi-bin/koha/errors/403.pl
66 ErrorDocument 404 /cgi-bin/koha/errors/404.pl
67 ErrorDocument 500 /cgi-bin/koha/errors/500.pl
68
69 RewriteEngine On