1 # Koha Apache Configuration Directives
6 <VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT__>
7 ServerAdmin __WEBMASTER_EMAIL__
8 DocumentRoot __OPAC_WWW_DIR__
9 ServerName __WEBSERVER_HOST__
10 # ServerAlias opac.mydomain.com
11 ScriptAlias /cgi-bin/koha/ "__OPAC_CGI_DIR__/opac/"
12 ScriptAlias /index.html "__OPAC_CGI_DIR__/opac/opac-main.pl"
13 ScriptAlias /opac-search.pl "__OPAC_CGI_DIR__/opac/opac-search.pl"
14 ScriptAlias /search "__OPAC_CGI_DIR__/opac/opac-search.pl"
15 ErrorLog __LOG_DIR__/koha-opac-error_log
16 # TransferLog __LOG_DIR__/koha-opac-access_log
17 SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
18 SetEnv PERL5LIB "__PERL_MODULE_DIR__"
23 mod_gzip_keep_workfiles No
24 mod_gzip_can_negotiate yes
25 mod_gzip_update_static No
26 mod_gzip_temp_dir /tmp
27 mod_gzip_minimum_file_size 512
28 mod_gzip_maximum_file_size 1000000
29 mod_gzip_maximum_inmem_size 1000000
30 mod_gzip_handle_methods GET POST
31 mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
32 mod_gzip_item_exclude mime ^image/.*
33 mod_gzip_item_exclude rspheader Content-Type:image/*
34 mod_gzip_item_include file \.js$
35 mod_gzip_item_include mime ^application/x-javascript$
36 mod_gzip_item_include file \.php$
37 mod_gzip_item_include mime ^text/html$
38 mod_gzip_item_include file \.css$
39 mod_gzip_item_include mime ^text/css$
42 <IfModule mod_deflate.c>
44 # Compress content with type html, text, and css, ...
45 AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
46 AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
48 DeflateCompressionLevel 9
50 # Properly handle old browsers that do not support compression
51 BrowserMatch ^Mozilla/4 gzip-only-text/html
52 BrowserMatch ^Mozilla/4\.0[678] no-gzip
53 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
55 DeflateFilterNote Input instream
56 DeflateFilterNote Output outstream
57 DeflateFilterNote Ratio ratio
59 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
60 <IfModule mod_headers.c>
61 #properly handle requests coming from behind proxies
62 Header append Vary User-Agent
67 # Repeat this virtualhost stanza changing the following environment vars to
68 # create multiple OPAC interfaces with custom css and/or search limits:
69 # SetEnv OPAC_CSS_OVERRIDE mystyle.css
70 # SetEnv OPAC_SEARCH_LIMIT branch:CODE
71 # SetEnv OPAC_LIMIT_OVERRIDE 1
73 Options +FollowSymLinks
75 ErrorDocument 400 /cgi-bin/koha/errors/400.pl
76 ErrorDocument 401 /cgi-bin/koha/errors/401.pl
77 ErrorDocument 403 /cgi-bin/koha/errors/403.pl
78 ErrorDocument 404 /cgi-bin/koha/errors/404.pl
79 ErrorDocument 500 /cgi-bin/koha/errors/500.pl
84 # Uncomment to turn on rewrite logging
85 # RewriteLog __LOG_DIR__/koha-opac-rewrite.log
87 RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
88 RewriteRule (.+) $1?%1%2 [N,R,NE]
90 RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
91 RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
92 RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
96 <VirtualHost __WEBSERVER_IP__:__WEBSERVER_PORT_LIBRARIAN__>
97 ServerAdmin __WEBMASTER_EMAIL__
98 DocumentRoot __INTRANET_WWW_DIR__
99 ServerName __WEBSERVER_HOST__:__WEBSERVER_PORT_LIBRARIAN__
100 # ServerAlias intranet.mydomain.com
101 ScriptAlias /cgi-bin/koha/ "__INTRANET_CGI_DIR__/"
102 ScriptAlias /index.html "__INTRANET_CGI_DIR__/mainpage.pl"
103 ScriptAlias /search "__INTRANET_CGI_DIR__/search.pl"
104 ErrorLog __LOG_DIR__/koha-error_log
105 # TransferLog __LOG_DIR__/koha-access_log
106 SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
107 SetEnv PERL5LIB "__PERL_MODULE_DIR__"
108 Options +FollowSymLinks
110 ErrorDocument 400 /cgi-bin/koha/errors/400.pl
111 ErrorDocument 401 /cgi-bin/koha/errors/401.pl
112 ErrorDocument 403 /cgi-bin/koha/errors/403.pl
113 ErrorDocument 404 /cgi-bin/koha/errors/404.pl
114 ErrorDocument 500 /cgi-bin/koha/errors/500.pl
116 <IfModule mod_gzip.c>
119 mod_gzip_keep_workfiles No
120 mod_gzip_can_negotiate yes
121 mod_gzip_update_static No
122 mod_gzip_temp_dir /tmp
123 mod_gzip_minimum_file_size 512
124 mod_gzip_maximum_file_size 1000000
125 mod_gzip_maximum_inmem_size 1000000
126 mod_gzip_handle_methods GET POST
127 mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
128 mod_gzip_item_exclude mime ^image/.*
129 mod_gzip_item_exclude rspheader Content-Type:image/*
130 mod_gzip_item_include file \.js$
131 mod_gzip_item_include mime ^application/x-javascript$
132 mod_gzip_item_include file \.php$
133 mod_gzip_item_include mime ^text/html$
134 mod_gzip_item_include file \.css$
135 mod_gzip_item_include mime ^text/css$
138 <IfModule mod_deflate.c>
140 # Compress content with type html, text, and css, ...
141 AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
142 AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
144 DeflateCompressionLevel 9
146 # Properly handle old browsers that do not support compression
147 BrowserMatch ^Mozilla/4 gzip-only-text/html
148 BrowserMatch ^Mozilla/4\.0[678] no-gzip
149 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
151 DeflateFilterNote Input instream
152 DeflateFilterNote Output outstream
153 DeflateFilterNote Ratio ratio
155 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
156 <IfModule mod_headers.c>
157 #properly handle requests coming from behind proxies
158 Header append Vary User-Agent
163 # Uncomment to turn on rewrite logging
164 # RewriteLog __LOG_DIR__/koha-intranet-rewrite.log
167 RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
168 RewriteRule (.+) $1?%1%2 [N,R,NE]
169 RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT]
170 RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
171 RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]