Bug 26685: Move starman out of debian/control.in and into cpanfile
[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 <IfModule mod_expires.c>
60     ExpiresActive on
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"
65 </IfModule>
66
67 Options +FollowSymLinks -Indexes
68
69
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
75
76 RewriteEngine On
77
78 <IfModule mod_headers.c>
79    # Erase any X-Koha-SetEnv headers from the client
80    RequestHeader unset X-Koha-SetEnv
81 </IfModule>