1 # ----------------------------------------------------------------------------------
2 # This is the global Evergreen virtual host config. Anything you want published
3 # through all virtual hosts (port 80, port 443, etc.) should live in here.
4 # ----------------------------------------------------------------------------------
6 # Since Apache 2.2 doesn't set REQUEST_SCHEME, work around it
7 # by setting an environment variable, per
8 # http://stackoverflow.com/a/23177714
9 RewriteCond %{HTTPS} off
10 RewriteRule .* - [E=REQUEST_SCHEME:http]
12 RewriteCond %{HTTPS} on
13 RewriteRule .* - [E=REQUEST_SCHEME:https]
15 # ----------------------------------------------------------------------------------
16 # Point / to the opac - if you have a custom skin or locale, point at it here
17 # ----------------------------------------------------------------------------------
18 RewriteRule ^/$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/eg/opac/home [R=301,L]
20 # ----------------------------------------------------------------------------------
21 # Redirect staff to the correct URL if they forget to include the final /
22 # ----------------------------------------------------------------------------------
23 RewriteRule ^/eg/staff$ https://%{HTTP_HOST}/eg/staff/ [R=301,L]
25 # ----------------------------------------------------------------------------------
26 # Point / to the IP address redirector
27 # ----------------------------------------------------------------------------------
29 # SetHandler perl-script
30 # PerlHandler OpenILS::WWW::Redirect
33 # #PerlSetVar OILSRedirectSkin "default"
34 # # OILSRedirectDepth defaults to the depth of the branch that the OPAC was directed to
35 # #PerlSetVar OILSRedirectDepth "0"
36 # #PerlSetVar OILSRedirectLocale "en-US"
37 # # Use the template-toolkit opac
38 # #PerlSetVar OILSRedirectTpac "true"
43 # ----------------------------------------------------------------------------------
44 # Assign a default locale to the accessible OPAC
45 # ----------------------------------------------------------------------------------
46 RewriteRule ^/opac/extras/slimpac/start.html$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/opac/en-US/extras/slimpac/start.html [R=301,L]
47 RewriteRule ^/opac/extras/slimpac/advanced.html$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/opac/en-US/extras/slimpac/advanced.html [R=301,L]
49 # ----------------------------------------------------------------------------------
50 # Configure the gateway and translator
51 # ----------------------------------------------------------------------------------
52 OSRFGatewayConfig @sysconfdir@/opensrf_core.xml
53 OSRFTranslatorConfig @sysconfdir@/opensrf_core.xml
54 # Translator memcache server. Default is localhost
55 # OSRFTranslatorCacheServer 127.0.0.1:11211
58 # ----------------------------------------------------------------------------------
59 # Added content plugin
60 # ----------------------------------------------------------------------------------
61 <Location /opac/extras/ac/>
62 SetHandler perl-script
63 PerlHandler OpenILS::WWW::AddedContent
69 # Lock clearing cache down to STAFF_LOGIN
70 <Location /opac/extras/ac/clearcache/>
71 PerlAccessHandler OpenILS::WWW::AccessHandler
72 PerlSetVar OILSAccessHandlerPermission "STAFF_LOGIN"
75 # Autosuggest for searches
76 <Location /opac/extras/autosuggest>
77 SetHandler perl-script
78 PerlHandler OpenILS::WWW::AutoSuggest
84 <Location /opac/extras/flattener>
85 SetHandler perl-script
86 PerlHandler OpenILS::WWW::FlatFielder
91 # ----------------------------------------------------------------------------------
92 # Replace broken cover images with a transparent GIF by default
93 # ----------------------------------------------------------------------------------
95 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
96 /opac/images/blank.png [P,L]
98 <Location /opac/extras/ac/jacket>
99 ErrorDocument 404 /opac/images/blank.png
102 # Uncomment one or more of these to have a "no image" image other than the blank
105 # Note: There are no default images provided for these, you will need to provide
106 # your own "no image" image(s).
108 #<Location /opac/extras/ac/jacket/small>
109 # ErrorDocument 404 /opac/images/noimage_small.png
112 #<Location /opac/extras/ac/jacket/medium>
113 # ErrorDocument 404 /opac/images/noimage_medium.png
116 #<Location /opac/extras/ac/jacket/large>
117 # ErrorDocument 404 /opac/images/noimage_large.png
120 # ----------------------------------------------------------------------------------
121 # Add the row ID (RID) and date so we can make unAPI happy
122 # ----------------------------------------------------------------------------------
123 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
124 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
126 # ----------------------------------------------------------------------------------
127 # Pull the locale from the URL
128 # ----------------------------------------------------------------------------------
129 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
130 RewriteRule . - [E=locale:%1]
132 # -----------------------------------------------------------------------------$
133 # Force HTTPS for /eg/circ/selfcheck
134 # -----------------------------------------------------------------------------$
135 RewriteCond %{HTTPS} off
136 RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
138 # ----------------------------------------------------------------------------------
139 # For sanity reasons, default indexes to Off
140 # ----------------------------------------------------------------------------------
143 # ----------------------------------------------------------------------------------
145 # ----------------------------------------------------------------------------------
146 <LocationMatch /opac/>
147 AddType application/xhtml+xml .xml
149 # - configure mod_xmlent
151 XMLEntEscapeScript "no"
152 XMLEntStripComments "yes"
153 XMLEntContentType "text/html; charset=utf-8"
154 # forces quirks mode which we want for now
155 XMLEntStripDoctype "yes"
157 # - set up the include handlers
159 AddOutputFilter INCLUDES .xsl
160 AddOutputFilter INCLUDES;XMLENT .xml
162 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
164 # This gives you the option to configure a different host to serve OPAC images from
165 # Specify the hostname (without protocol) and path to the images. Protocol will
166 # be determined at runtime
167 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
169 # In addition to loading images from a static host, you can also load CSS and/or
170 # Javascript from a static host or hosts. Protocol will be determined at runtime
171 # and/or by configuration options immediately following.
172 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
173 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
175 # If you are not able to serve static content via https and
176 # wish to force http:// (and are comfortable with mixed-content
177 # warnings in client browsers), set this:
178 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
180 # If you would prefer to fall back to your non-static servers for
181 # https pages, avoiding mixed-content warnings in client browsers
182 # and are willing to accept some increased server load, set this:
183 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
185 # Specify a ChiliFresh account to integrate their services with the OPAC
186 #SetEnv OILS_CHILIFRESH_ACCOUNT
187 #SetEnv OILS_CHILIFRESH_PROFILE
188 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
189 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
191 # Specify the initial script URL for Novelist (containing account credentials, etc.)
192 #SetEnv OILS_NOVELIST_URL
195 # Uncomment to force SSL any time a patron is logged in. This protects
196 # authentication tokens. Left commented out for backwards compat for now.
197 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
199 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
200 #SetEnv OILS_OPAC_COMBINED_JS 1
205 # ----------------------------------------------------------------------------------
206 # Some mod_deflate fun
207 # ----------------------------------------------------------------------------------
208 <IfModule mod_deflate.c>
209 SetOutputFilter DEFLATE
211 BrowserMatch ^Mozilla/4 gzip-only-text/html
212 BrowserMatch ^Mozilla/4\.0[678] no-gzip
213 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
215 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
217 <IfModule mod_headers.c>
218 Header append Vary User-Agent env=!dont-vary
225 # ----------------------------------------------------------------------------------
226 # Some mod_deflate fun
227 # ----------------------------------------------------------------------------------
228 <IfModule mod_deflate.c>
229 SetOutputFilter DEFLATE
231 BrowserMatch ^Mozilla/4 gzip-only-text/html
232 BrowserMatch ^Mozilla/4\.0[678] no-gzip
233 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
235 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
237 <IfModule mod_headers.c>
238 Header append Vary User-Agent env=!dont-vary
244 # ----------------------------------------------------------------------------------
245 # Force SSL on the OPAC's "My Account" page
246 # ----------------------------------------------------------------------------------
247 <LocationMatch .*/myopac.xml>
251 RewriteCond %{QUERY_STRING} locale=([^&]*)
252 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/opac/%1/extras/slimpac/$1? [redirect]
253 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
254 AddOutputFilter INCLUDES;XMLENT .html
257 # ----------------------------------------------------------------------------------
258 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
259 # ----------------------------------------------------------------------------------
260 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
261 # Default to en-US if we haven't matched a locale of the form xx-YY
262 RewriteRule .? - [S=4]
263 RewriteRule ^/xul/ - [E=locale:en-US]
264 RewriteRule ^/reports/ - [E=locale:en-US]
265 RewriteRule .? - [E=locale:en-US]
266 RewriteRule .? - [S=3]
267 # Otherwise, set our real locale
268 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
269 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
270 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
272 <LocationMatch /xul/.*\.x?html$>
274 XMLEntEscapeScript "no"
275 XMLEntStripComments "yes"
277 XMLEntStripDoctype "yes"
278 XMLEntContentType "text/html; charset=utf-8"
279 AddOutputFilter INCLUDES;XMLENT .xhtml
280 AddOutputFilter INCLUDES;XMLENT .html
286 <LocationMatch /xul/.*\.xul$>
288 XMLEntContentType "application/vnd.mozilla.xul+xml"
289 AddOutputFilter INCLUDES;XMLENT .xul
294 # ----------------------------------------------------------------------------------
296 # ----------------------------------------------------------------------------------
297 <Location /opac/extras/oisbn>
298 SetHandler perl-script
299 PerlHandler OpenILS::WWW::SuperCat::oisbn
304 <Location /opac/extras/supercat>
305 SetHandler perl-script
306 PerlHandler OpenILS::WWW::SuperCat::supercat
311 <Location /opac/extras/unapi>
312 SetHandler perl-script
313 PerlHandler OpenILS::WWW::SuperCat::unapi
318 <Location /opac/extras/feed/bookbag>
319 SetHandler perl-script
320 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
325 <Location /opac/extras/opensearch>
326 SetHandler perl-script
327 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
332 <Location /opac/extras/sru>
333 SetHandler perl-script
334 PerlHandler OpenILS::WWW::SuperCat::sru_search
339 <Location /opac/extras/sru_auth>
340 SetHandler perl-script
341 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
346 <Location /opac/extras/feed/freshmeat>
347 SetHandler perl-script
348 PerlHandler OpenILS::WWW::SuperCat::changes_feed
353 <Location /opac/extras/browse>
354 SetHandler perl-script
355 PerlHandler OpenILS::WWW::SuperCat::string_browse
360 <Location /opac/extras/startwith>
361 SetHandler perl-script
362 PerlHandler OpenILS::WWW::SuperCat::string_startwith
368 # ----------------------------------------------------------------------------------
369 # Module for displaying OpenSRF API documentation
370 # ----------------------------------------------------------------------------------
371 <Location /opac/extras/docgen.xsl>
372 AddOutputFilter INCLUDES .xsl
375 # ----------------------------------------------------------------------------------
376 # Module for processing staff-client offline scripts lives here
377 # ----------------------------------------------------------------------------------
378 <Directory "@localstatedir@/cgi-bin/offline">
379 AddHandler cgi-script .pl
386 # ----------------------------------------------------------------------------------
387 # XXX Note, it's important to explicitly set the JSON encoding style
388 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
390 # ----------------------------------------------------------------------------------
391 # OpenSRF JSON legacy gateway
392 # ----------------------------------------------------------------------------------
394 SetHandler osrf_json_gateway_module
395 OSRFGatewayLegacyJSON "true"
398 # ----------------------------------------------------------------------------------
399 # New-style OpenSRF JSON gateway
400 # ----------------------------------------------------------------------------------
401 <Location /osrf-gateway-v1>
402 SetHandler osrf_json_gateway_module
403 OSRFGatewayLegacyJSON "false"
407 # ----------------------------------------------------------------------------------
408 # OpenSRF-over-HTTP translator
409 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
410 # ----------------------------------------------------------------------------------
411 <Location /osrf-http-translator>
412 SetHandler osrf_http_translator_module
416 # ----------------------------------------------------------------------------------
417 # The exporter lives here
418 # ----------------------------------------------------------------------------------
420 SetHandler perl-script
422 AuthName "Exporter Login"
423 PerlOptions +GlobalRequest
424 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
425 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
427 PerlHandler OpenILS::WWW::Exporter
433 <Location /opac/extras/merge_template>
434 SetHandler perl-script
436 AuthName "Batch Update Login"
437 PerlOptions +GlobalRequest
438 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
439 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
441 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
447 <Location /opac/extras/circ>
449 AuthName "Circ Extras Login"
450 PerlOptions +GlobalRequest
451 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
452 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
459 <Location /collections>
460 SetHandler perl-script
462 AuthName "Collections Login"
463 PerlOptions +GlobalRequest
464 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
465 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
472 # ----------------------------------------------------------------------------------
473 # Protect Standalone/Offline mode files from public view
474 # ----------------------------------------------------------------------------------
475 <Location /standalone/>
477 AuthName "Standalone Mode Login"
478 PerlOptions +GlobalRequest
479 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
480 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
487 # ----------------------------------------------------------------------------------
488 # Reporting output lives here
489 # ----------------------------------------------------------------------------------
490 <Location /reporter/>
492 AuthName "Report Login"
493 PerlOptions +GlobalRequest
494 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
495 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
502 # ----------------------------------------------------------------------------------
504 # ----------------------------------------------------------------------------------
505 <LocationMatch /reports.*\.x?html>
507 XMLEntContentType "text/html; charset=utf-8"
508 AddOutputFilter INCLUDES;XMLENT .xhtml
509 AddOutputFilter INCLUDES;XMLENT .html
512 <LocationMatch /reports>
514 AddOutputFilter INCLUDES;XMLENT .xhtml
517 # capture locale CGI param for /reports/fm_IDL.xml
518 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
519 RewriteCond %{QUERY_STRING} locale=([^&;]*)
520 RewriteRule . - [E=locale:%1]
522 <LocationMatch /reports/fm_IDL.xml>
523 IDLChunkStripPI "yes"
524 IDLChunkEscapeScript "no"
525 IDLChunkStripComments "yes"
526 IDLChunkStripDoctype "yes"
527 IDLChunkContentType "application/xml; charset=utf-8"
528 AddOutputFilter INCLUDES;IDLCHUNK .xml
532 # ----------------------------------------------------------------------------------
534 # ----------------------------------------------------------------------------------
536 SetHandler perl-script
537 PerlHandler OpenILS::WWW::EDI
543 # ----------------------------------------------------------------------------------
545 # ----------------------------------------------------------------------------------
547 SetHandler perl-script
548 PerlHandler OpenILS::WWW::XMLRPCGateway
552 <IfModule mod_headers.c>
553 Header onsuccess set Cache-Control no-cache
557 # ----------------------------------------------------------------------------------
558 # Conify - next-generation Evergreen administration interface
559 # ----------------------------------------------------------------------------------
560 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
564 XMLEntEscapeScript "no"
565 XMLEntStripComments "no"
566 XMLEntContentType "text/html; charset=utf-8"
567 AddOutputFilter INCLUDES;XMLENT .html
570 AuthName "Dojo Admin Login"
571 PerlOptions +GlobalRequest
572 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
573 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
580 # ----------------------------------------------------------------------------------
581 # The PhoneList lives here
582 # ----------------------------------------------------------------------------------
583 <Location /phonelist>
584 SetHandler perl-script
586 AuthName "PhoneList Login"
588 PerlOptions +GlobalRequest
589 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
590 PerlHandler OpenILS::WWW::PhoneList
591 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
595 <IfModule mod_headers.c>
596 Header onsuccess set Cache-Control no-cache
599 <Location /vandelay-upload>
600 SetHandler perl-script
601 PerlHandler OpenILS::WWW::Vandelay::spool_marc
606 # OpenURL 0.1 searching based on OpenSearch
607 RewriteMap openurl prg:@bindir@/openurl_map.pl
608 RewriteCond %{QUERY_STRING} (^.*$)
609 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
613 # General Evergreen web template processor
615 SetHandler perl-script
616 PerlHandler OpenILS::WWW::EGWeb
621 PerlSetVar OILSWebBasePath "/eg"
622 PerlSetVar OILSWebWebDir "@localstatedir@/web"
623 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
625 # Enable Template-Toolkit error debugging messages (apache error log)
626 PerlSetVar OILSWebDebugTemplate "false"
627 # local cache of compiled Template Toolkit templates
628 PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
629 # template TTL - how long, in seconds, that Template Toolkit
630 # waits to check for updated template files
631 #PerlSetVar OILSWebTemplateStatTTL 60
633 # -------------------------------------------------------
634 # Media Prefix. In the 3rd example, the protocol (http) is enforced
635 #PerlSetVar OILSWebMediaPrefix "/media"
636 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
637 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
639 # Locale messages files:
641 # These appear in pairs; the first represents the user agent
642 # Accept-Language header locale, and the second represents
643 # the fully-qualified path for the corresponding PO file that
644 # contains the messages.
646 # If you enable two or more locales, then users will be able to
647 # select their preferred locale from a locale picker in the TPAC.
649 #PerlAddVar OILSWebLocale "en"
650 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/messages.en.po"
651 #PerlAddVar OILSWebLocale "en_ca"
652 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/en-CA.po"
653 #PerlAddVar OILSWebLocale "fr_ca"
654 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/fr-CA.po"
656 # Set the default locale: defaults to en-US
657 #PerlAddVar OILSWebDefaultLocale "fr_ca"
659 # Templates will be loaded from the following paths in reverse order.
660 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
661 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
663 #-------------------------------------------------
664 # Added Content Configuration
665 #-------------------------------------------------
667 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
668 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
671 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
672 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
675 #SetEnv OILS_CHILIFRESH_ACCOUNT
676 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
677 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
678 #-------------------------------------------------
680 <IfModule mod_deflate.c>
681 SetOutputFilter DEFLATE
682 BrowserMatch ^Mozilla/4 gzip-only-text/html
683 BrowserMatch ^Mozilla/4\.0[678] no-gzip
684 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
685 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
686 <IfModule mod_headers.c>
687 Header append Cache-Control "public"
688 Header append Vary User-Agent env=!dont-vary
692 <LocationMatch ^/(images|css|js)/>
693 # should pick up the default expire time from eg.conf...
694 <IfModule mod_deflate.c>
695 SetOutputFilter DEFLATE
696 BrowserMatch ^Mozilla/4 gzip-only-text/html
697 BrowserMatch ^Mozilla/4\.0[678] no-gzip
698 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
699 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
700 <IfModule mod_headers.c>
701 Header append Cache-Control "public"
702 Header append Vary User-Agent env=!dont-vary
707 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
708 # Expire the HTML quickly since we're loading dynamic data for each page
710 ExpiresByType text/html "access plus 5 seconds"
713 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
714 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
716 ExpiresByType text/html "access plus 5 seconds"
719 # Note: the template processor will decline handling anything it does not
720 # have an explicit configuration for, which means it will fall back to
721 # Apache to serve the file. However, in the interest of speed, go ahead
722 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
723 # Add more exemptions as needed.
724 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
728 # ----------------------------------------------------------------------------------
729 # Some mod_deflate setup
730 # ----------------------------------------------------------------------------------
731 <IfModule mod_deflate.c>
732 ## optional logging for mod_deflate debugging
733 ##DeflateFilterNote Input instream
734 ##DeflateFilterNote Output outstream
735 ##DeflateFilterNote Ratio ratio
737 ##LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
738 ##CustomLog /var/log/apache2/deflate_log deflate
740 # There are problems with XMLENT and mod_deflate - so lets disable it
741 # This is where we don't have a pre-existing LocationMatch directive earlier
742 <LocationMatch /opac/.*\.xml$>
745 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
748 <LocationMatch /reports/.*\.xhtml$>
751 <LocationMatch /conify/.*\.html$>
759 SetHandler perl-script
760 PerlHandler OpenILS::WWW::IDL2js
765 <IfModule mod_headers.c>
766 Header append Cache-Control "public"
769 <IfModule mod_deflate.c>
770 SetOutputFilter DEFLATE
771 BrowserMatch ^Mozilla/4 gzip-only-text/html
772 BrowserMatch ^Mozilla/4\.0[678] no-gzip
773 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
774 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
775 <IfModule mod_headers.c>
776 Header append Vary User-Agent env=!dont-vary
781 <LocationMatch /eg/staff/>
784 PerlSetVar OILSWebStopAtIndex "true"
786 RewriteCond %{HTTPS} off
787 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
789 # sample staff-specific translation files
790 #PerlAddVar OILSWebLocale "en_ca"
791 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/en-CA.po"
792 #PerlAddVar OILSWebLocale "fr_ca"
793 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/fr-CA.po"
797 <IfModule mod_headers.c>
798 Header append Cache-Control "public"
800 <IfModule mod_deflate.c>
801 SetOutputFilter DEFLATE
802 BrowserMatch ^Mozilla/4 gzip-only-text/html
803 BrowserMatch ^Mozilla/4\.0[678] no-gzip
804 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
805 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
806 <IfModule mod_headers.c>
807 Header append Vary User-Agent env=!dont-vary
812 # Uncomment the following to force SSL for everything. Note that this defeats caching
813 # and you will suffer a performance hit.
814 #RewriteCond %{HTTPS} off
815 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]