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 # Rewrite JSPac->TPac with redirects
134 # ----------------------------------------------------------------------------------
136 RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
138 # -----------------------------------------------------------------------------$
139 # Force HTTPS for /eg/circ/selfcheck
140 # -----------------------------------------------------------------------------$
141 RewriteCond %{HTTPS} off
142 RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
144 # ----------------------------------------------------------------------------------
145 # For sanity reasons, default indexes to Off
146 # ----------------------------------------------------------------------------------
149 # ----------------------------------------------------------------------------------
151 # ----------------------------------------------------------------------------------
152 <LocationMatch /opac/>
153 AddType application/xhtml+xml .xml
155 # - configure mod_xmlent
157 XMLEntEscapeScript "no"
158 XMLEntStripComments "yes"
159 XMLEntContentType "text/html; charset=utf-8"
160 # forces quirks mode which we want for now
161 XMLEntStripDoctype "yes"
163 # - set up the include handlers
165 AddOutputFilter INCLUDES .xsl
166 AddOutputFilter INCLUDES;XMLENT .xml
168 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
170 # This gives you the option to configure a different host to serve OPAC images from
171 # Specify the hostname (without protocol) and path to the images. Protocol will
172 # be determined at runtime
173 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
175 # In addition to loading images from a static host, you can also load CSS and/or
176 # Javascript from a static host or hosts. Protocol will be determined at runtime
177 # and/or by configuration options immediately following.
178 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
179 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
181 # If you are not able to serve static content via https and
182 # wish to force http:// (and are comfortable with mixed-content
183 # warnings in client browsers), set this:
184 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
186 # If you would prefer to fall back to your non-static servers for
187 # https pages, avoiding mixed-content warnings in client browsers
188 # and are willing to accept some increased server load, set this:
189 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
191 # Specify a ChiliFresh account to integrate their services with the OPAC
192 #SetEnv OILS_CHILIFRESH_ACCOUNT
193 #SetEnv OILS_CHILIFRESH_PROFILE
194 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
195 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
197 # Specify the initial script URL for Novelist (containing account credentials, etc.)
198 #SetEnv OILS_NOVELIST_URL
201 # Uncomment to force SSL any time a patron is logged in. This protects
202 # authentication tokens. Left commented out for backwards compat for now.
203 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
205 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
206 #SetEnv OILS_OPAC_COMBINED_JS 1
211 # ----------------------------------------------------------------------------------
212 # Some mod_deflate fun
213 # ----------------------------------------------------------------------------------
214 <IfModule mod_deflate.c>
215 SetOutputFilter DEFLATE
217 BrowserMatch ^Mozilla/4 gzip-only-text/html
218 BrowserMatch ^Mozilla/4\.0[678] no-gzip
219 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
221 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
223 <IfModule mod_headers.c>
224 Header append Vary User-Agent env=!dont-vary
231 # ----------------------------------------------------------------------------------
232 # Some mod_deflate fun
233 # ----------------------------------------------------------------------------------
234 <IfModule mod_deflate.c>
235 SetOutputFilter DEFLATE
237 BrowserMatch ^Mozilla/4 gzip-only-text/html
238 BrowserMatch ^Mozilla/4\.0[678] no-gzip
239 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
241 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
243 <IfModule mod_headers.c>
244 Header append Vary User-Agent env=!dont-vary
250 # ----------------------------------------------------------------------------------
251 # Force SSL on the OPAC's "My Account" page
252 # ----------------------------------------------------------------------------------
253 <LocationMatch .*/myopac.xml>
257 RewriteCond %{QUERY_STRING} locale=([^&]*)
258 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/opac/%1/extras/slimpac/$1? [redirect]
259 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
260 AddOutputFilter INCLUDES;XMLENT .html
263 # ----------------------------------------------------------------------------------
264 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
265 # ----------------------------------------------------------------------------------
266 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
267 # Default to en-US if we haven't matched a locale of the form xx-YY
268 RewriteRule .? - [S=4]
269 RewriteRule ^/xul/ - [E=locale:en-US]
270 RewriteRule ^/reports/ - [E=locale:en-US]
271 RewriteRule .? - [E=locale:en-US]
272 RewriteRule .? - [S=3]
273 # Otherwise, set our real locale
274 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
275 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
276 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
278 <LocationMatch /xul/.*\.x?html$>
280 XMLEntEscapeScript "no"
281 XMLEntStripComments "yes"
283 XMLEntStripDoctype "yes"
284 XMLEntContentType "text/html; charset=utf-8"
285 AddOutputFilter INCLUDES;XMLENT .xhtml
286 AddOutputFilter INCLUDES;XMLENT .html
292 <LocationMatch /xul/.*\.xul$>
294 XMLEntContentType "application/vnd.mozilla.xul+xml"
295 AddOutputFilter INCLUDES;XMLENT .xul
300 # ----------------------------------------------------------------------------------
302 # ----------------------------------------------------------------------------------
303 <Location /opac/extras/oisbn>
304 SetHandler perl-script
305 PerlHandler OpenILS::WWW::SuperCat::oisbn
310 <Location /opac/extras/supercat>
311 SetHandler perl-script
312 PerlHandler OpenILS::WWW::SuperCat::supercat
317 <Location /opac/extras/unapi>
318 SetHandler perl-script
319 PerlHandler OpenILS::WWW::SuperCat::unapi
324 <Location /opac/extras/feed/bookbag>
325 SetHandler perl-script
326 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
331 <Location /opac/extras/opensearch>
332 SetHandler perl-script
333 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
338 <Location /opac/extras/sru>
339 SetHandler perl-script
340 PerlHandler OpenILS::WWW::SuperCat::sru_search
345 <Location /opac/extras/sru_auth>
346 SetHandler perl-script
347 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
352 <Location /opac/extras/feed/freshmeat>
353 SetHandler perl-script
354 PerlHandler OpenILS::WWW::SuperCat::changes_feed
359 <Location /opac/extras/browse>
360 SetHandler perl-script
361 PerlHandler OpenILS::WWW::SuperCat::string_browse
366 <Location /opac/extras/startwith>
367 SetHandler perl-script
368 PerlHandler OpenILS::WWW::SuperCat::string_startwith
374 # ----------------------------------------------------------------------------------
375 # Module for displaying OpenSRF API documentation
376 # ----------------------------------------------------------------------------------
377 <Location /opac/extras/docgen.xsl>
378 AddOutputFilter INCLUDES .xsl
381 # ----------------------------------------------------------------------------------
382 # Module for processing staff-client offline scripts lives here
383 # ----------------------------------------------------------------------------------
384 <Directory "@localstatedir@/cgi-bin/offline">
385 AddHandler cgi-script .pl
392 # ----------------------------------------------------------------------------------
393 # XXX Note, it's important to explicitly set the JSON encoding style
394 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
396 # ----------------------------------------------------------------------------------
397 # OpenSRF JSON legacy gateway
398 # ----------------------------------------------------------------------------------
400 SetHandler osrf_json_gateway_module
401 OSRFGatewayLegacyJSON "true"
404 # ----------------------------------------------------------------------------------
405 # New-style OpenSRF JSON gateway
406 # ----------------------------------------------------------------------------------
407 <Location /osrf-gateway-v1>
408 SetHandler osrf_json_gateway_module
409 OSRFGatewayLegacyJSON "false"
413 # ----------------------------------------------------------------------------------
414 # OpenSRF-over-HTTP translator
415 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
416 # ----------------------------------------------------------------------------------
417 <Location /osrf-http-translator>
418 SetHandler osrf_http_translator_module
422 # ----------------------------------------------------------------------------------
423 # The exporter lives here
424 # ----------------------------------------------------------------------------------
426 SetHandler perl-script
428 AuthName "Exporter Login"
429 PerlOptions +GlobalRequest
430 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
431 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
433 PerlHandler OpenILS::WWW::Exporter
439 <Location /opac/extras/merge_template>
440 SetHandler perl-script
442 AuthName "Batch Update Login"
443 PerlOptions +GlobalRequest
444 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
445 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
447 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
453 <Location /opac/extras/circ>
455 AuthName "Circ Extras Login"
456 PerlOptions +GlobalRequest
457 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
458 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
465 <Location /collections>
466 SetHandler perl-script
468 AuthName "Collections Login"
469 PerlOptions +GlobalRequest
470 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
471 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
478 # ----------------------------------------------------------------------------------
479 # Protect Standalone/Offline mode files from public view
480 # ----------------------------------------------------------------------------------
481 <Location /standalone/>
483 AuthName "Standalone Mode Login"
484 PerlOptions +GlobalRequest
485 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
486 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
493 # ----------------------------------------------------------------------------------
494 # Reporting output lives here
495 # ----------------------------------------------------------------------------------
496 <Location /reporter/>
498 AuthName "Report Login"
499 PerlOptions +GlobalRequest
500 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
501 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
508 # ----------------------------------------------------------------------------------
510 # ----------------------------------------------------------------------------------
511 <LocationMatch /reports.*\.x?html>
513 XMLEntContentType "text/html; charset=utf-8"
514 AddOutputFilter INCLUDES;XMLENT .xhtml
515 AddOutputFilter INCLUDES;XMLENT .html
518 <LocationMatch /reports>
520 AddOutputFilter INCLUDES;XMLENT .xhtml
523 # capture locale CGI param for /reports/fm_IDL.xml
524 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
525 RewriteCond %{QUERY_STRING} locale=([^&;]*)
526 RewriteRule . - [E=locale:%1]
528 <LocationMatch /reports/fm_IDL.xml>
529 IDLChunkStripPI "yes"
530 IDLChunkEscapeScript "no"
531 IDLChunkStripComments "yes"
532 IDLChunkStripDoctype "yes"
533 IDLChunkContentType "application/xml; charset=utf-8"
534 AddOutputFilter INCLUDES;IDLCHUNK .xml
538 # ----------------------------------------------------------------------------------
540 # ----------------------------------------------------------------------------------
542 SetHandler perl-script
543 PerlHandler OpenILS::WWW::EDI
549 # ----------------------------------------------------------------------------------
551 # ----------------------------------------------------------------------------------
553 SetHandler perl-script
554 PerlHandler OpenILS::WWW::XMLRPCGateway
558 <IfModule mod_headers.c>
559 Header onsuccess set Cache-Control no-cache
563 # ----------------------------------------------------------------------------------
564 # Conify - next-generation Evergreen administration interface
565 # ----------------------------------------------------------------------------------
566 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
570 XMLEntEscapeScript "no"
571 XMLEntStripComments "no"
572 XMLEntContentType "text/html; charset=utf-8"
573 AddOutputFilter INCLUDES;XMLENT .html
576 AuthName "Dojo Admin Login"
577 PerlOptions +GlobalRequest
578 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
579 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
586 # ----------------------------------------------------------------------------------
587 # The PhoneList lives here
588 # ----------------------------------------------------------------------------------
589 <Location /phonelist>
590 SetHandler perl-script
592 AuthName "PhoneList Login"
594 PerlOptions +GlobalRequest
595 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
596 PerlHandler OpenILS::WWW::PhoneList
597 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
601 <IfModule mod_headers.c>
602 Header onsuccess set Cache-Control no-cache
605 <Location /vandelay-upload>
606 SetHandler perl-script
607 PerlHandler OpenILS::WWW::Vandelay::spool_marc
612 # OpenURL 0.1 searching based on OpenSearch
613 RewriteMap openurl prg:@bindir@/openurl_map.pl
614 RewriteCond %{QUERY_STRING} (^.*$)
615 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
619 # General Evergreen web template processor
621 SetHandler perl-script
622 PerlHandler OpenILS::WWW::EGWeb
627 PerlSetVar OILSWebBasePath "/eg"
628 PerlSetVar OILSWebWebDir "@localstatedir@/web"
629 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
631 # Port Apache listens on for HTTP traffic. Used for HTTP requests
632 # routed from Perl handlers back to the same Apache instance, like
633 # added content requests. Use this when running Apache with a
634 # non-standard port, typical with a proxy setup. Defaults to "80".
635 # PerlSetVar OILSWebInternalHTTPPort "7080"
637 # Enable Template-Toolkit error debugging messages (apache error log)
638 PerlSetVar OILSWebDebugTemplate "false"
639 # local cache of compiled Template Toolkit templates
640 PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
641 # template TTL - how long, in seconds, that Template Toolkit
642 # waits to check for updated template files
643 #PerlSetVar OILSWebTemplateStatTTL 60
645 # -------------------------------------------------------
646 # Media Prefix. In the 3rd example, the protocol (http) is enforced
647 #PerlSetVar OILSWebMediaPrefix "/media"
648 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
649 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
651 # Locale messages files:
653 # These appear in pairs; the first represents the user agent
654 # Accept-Language header locale, and the second represents
655 # the fully-qualified path for the corresponding PO file that
656 # contains the messages.
658 # If you enable two or more locales, then users will be able to
659 # select their preferred locale from a locale picker in the TPAC.
661 #PerlAddVar OILSWebLocale "en"
662 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/messages.en.po"
663 #PerlAddVar OILSWebLocale "en_ca"
664 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/en-CA.po"
665 #PerlAddVar OILSWebLocale "fr_ca"
666 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/fr-CA.po"
668 # Set the default locale: defaults to en-US
669 #PerlAddVar OILSWebDefaultLocale "fr_ca"
671 # Templates will be loaded from the following paths in reverse order.
672 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
673 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
675 #-------------------------------------------------
676 # Added Content Configuration
677 #-------------------------------------------------
679 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
680 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
683 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
684 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
687 #SetEnv OILS_CHILIFRESH_ACCOUNT
688 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
689 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
690 #-------------------------------------------------
692 <IfModule mod_deflate.c>
693 SetOutputFilter DEFLATE
694 BrowserMatch ^Mozilla/4 gzip-only-text/html
695 BrowserMatch ^Mozilla/4\.0[678] no-gzip
696 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
697 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
698 <IfModule mod_headers.c>
699 Header append Cache-Control "public"
700 Header append Vary User-Agent env=!dont-vary
704 <LocationMatch ^/(images|css|js)/>
705 # should pick up the default expire time from eg.conf...
706 <IfModule mod_deflate.c>
707 SetOutputFilter DEFLATE
708 BrowserMatch ^Mozilla/4 gzip-only-text/html
709 BrowserMatch ^Mozilla/4\.0[678] no-gzip
710 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
711 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
712 <IfModule mod_headers.c>
713 Header append Cache-Control "public"
714 Header append Vary User-Agent env=!dont-vary
719 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
720 # Expire the HTML quickly since we're loading dynamic data for each page
722 ExpiresByType text/html "access plus 5 seconds"
725 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
726 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
728 ExpiresByType text/html "access plus 5 seconds"
731 # Note: the template processor will decline handling anything it does not
732 # have an explicit configuration for, which means it will fall back to
733 # Apache to serve the file. However, in the interest of speed, go ahead
734 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
735 # Add more exemptions as needed.
736 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
740 # ----------------------------------------------------------------------------------
741 # Some mod_deflate setup
742 # ----------------------------------------------------------------------------------
743 <IfModule mod_deflate.c>
744 ## optional logging for mod_deflate debugging
745 ##DeflateFilterNote Input instream
746 ##DeflateFilterNote Output outstream
747 ##DeflateFilterNote Ratio ratio
749 ##LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
750 ##CustomLog /var/log/apache2/deflate_log deflate
752 # There are problems with XMLENT and mod_deflate - so lets disable it
753 # This is where we don't have a pre-existing LocationMatch directive earlier
754 <LocationMatch /opac/.*\.xml$>
757 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
760 <LocationMatch /reports/.*\.xhtml$>
763 <LocationMatch /conify/.*\.html$>
771 SetHandler perl-script
772 PerlHandler OpenILS::WWW::IDL2js
777 <IfModule mod_headers.c>
778 Header append Cache-Control "public"
781 <IfModule mod_deflate.c>
782 SetOutputFilter DEFLATE
783 BrowserMatch ^Mozilla/4 gzip-only-text/html
784 BrowserMatch ^Mozilla/4\.0[678] no-gzip
785 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
786 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
787 <IfModule mod_headers.c>
788 Header append Vary User-Agent env=!dont-vary
793 <LocationMatch /eg/staff/>
796 PerlSetVar OILSWebStopAtIndex "true"
798 RewriteCond %{HTTPS} off
799 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
801 # sample staff-specific translation files
802 #PerlAddVar OILSWebLocale "en_ca"
803 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/en-CA.po"
804 #PerlAddVar OILSWebLocale "fr_ca"
805 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/fr-CA.po"
809 <IfModule mod_headers.c>
810 Header append Cache-Control "public"
812 <IfModule mod_deflate.c>
813 SetOutputFilter DEFLATE
814 BrowserMatch ^Mozilla/4 gzip-only-text/html
815 BrowserMatch ^Mozilla/4\.0[678] no-gzip
816 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
817 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
818 <IfModule mod_headers.c>
819 Header append Vary User-Agent env=!dont-vary
824 # Uncomment the following to force SSL for everything. Note that this defeats caching
825 # and you will suffer a performance hit.
826 #RewriteCond %{HTTPS} off
827 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]