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 # ----------------------------------------------------------------------------------
7 # Point / to the opac - if you have a custom skin or locale, point at it here
8 # ----------------------------------------------------------------------------------
9 RedirectMatch 301 ^/$ /eg/opac/home
11 # ----------------------------------------------------------------------------------
12 # Point / to the IP address redirector
13 # ----------------------------------------------------------------------------------
15 # SetHandler perl-script
16 # PerlHandler OpenILS::WWW::Redirect
19 # #PerlSetVar OILSRedirectSkin "default"
20 # # OILSRedirectDepth defaults to the depth of the branch that the OPAC was directed to
21 # #PerlSetVar OILSRedirectDepth "0"
22 # #PerlSetVar OILSRedirectLocale "en-US"
23 # # Use the template-toolkit opac
24 # #PerlSetVar OILSRedirectTpac "true"
29 # ----------------------------------------------------------------------------------
30 # Assign a default locale to the accessible OPAC
31 # ----------------------------------------------------------------------------------
32 RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpac/start.html
33 RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html
35 # ----------------------------------------------------------------------------------
36 # Configure the gateway
37 # ----------------------------------------------------------------------------------
38 OSRFGatewayConfig @sysconfdir@/opensrf_core.xml
39 # Translator memcache server. Default is localhost
40 # OSRFTranslatorCacheServer 127.0.0.1:11211
43 # ----------------------------------------------------------------------------------
44 # Added content plugin
45 # ----------------------------------------------------------------------------------
46 <Location /opac/extras/ac/>
47 SetHandler perl-script
48 PerlHandler OpenILS::WWW::AddedContent
54 # Autosuggest for searches
55 <Location /opac/extras/autosuggest>
56 SetHandler perl-script
57 PerlHandler OpenILS::WWW::AutoSuggest
63 <Location /opac/extras/flattener>
64 SetHandler perl-script
65 PerlHandler OpenILS::WWW::FlatFielder
70 # ----------------------------------------------------------------------------------
71 # Replace broken cover images with a transparent GIF by default
72 # ----------------------------------------------------------------------------------
74 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
75 /opac/images/blank.png [P,L]
77 # ----------------------------------------------------------------------------------
78 # Add the row ID (RID) and date so we can make unAPI happy
79 # ----------------------------------------------------------------------------------
80 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
81 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
83 # ----------------------------------------------------------------------------------
84 # Pull the locale from the URL
85 # ----------------------------------------------------------------------------------
86 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
87 RewriteRule . - [E=locale:%1]
89 # ----------------------------------------------------------------------------------
90 # Rewrite JSPac->TPac with redirects
91 # ----------------------------------------------------------------------------------
93 # First things first, extract useful data
94 # And we are going to start with a "this is the JSPac" check on each of these:
95 # RewriteCond %{REQUEST_URI} ^/?opac/
97 # Basic (overall) search type, if present
98 # I am cheating and grabbing RT or TP because I dunno the difference between them.
99 RewriteCond %{REQUEST_URI} ^/opac/
100 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
101 RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
103 # Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
104 RewriteCond %{REQUEST_URI} ^/opac/
105 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
106 RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
108 # Search Location, if present
109 RewriteCond %{REQUEST_URI} ^/opac/
110 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
111 RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
114 RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml /eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
117 # /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
118 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
119 RewriteRule /opac/.*/rdetail.xml /eg/opac/record/%2?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
122 # /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
123 RewriteRule /opac/extras/feed/bookbag/html-full/(\d*) /eg/opac/results?bookbag=$1;%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
125 # Search Results Pages
126 RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
128 # Basic Search (STILL not doing advanced)
129 # Fallback! But only for things that end in xml, htm, or html
130 # Images, CSS, etc can stick around.
131 RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
133 # ----------------------------------------------------------------------------------
134 # For sanity reasons, default indexes to Off
135 # ----------------------------------------------------------------------------------
138 # ----------------------------------------------------------------------------------
140 # ----------------------------------------------------------------------------------
141 <LocationMatch /opac/>
142 SSILegacyExprParser on
143 AddType application/xhtml+xml .xml
145 # - configure mod_xmlent
147 XMLEntEscapeScript "no"
148 XMLEntStripComments "yes"
149 XMLEntContentType "text/html; charset=utf-8"
150 # forces quirks mode which we want for now
151 XMLEntStripDoctype "yes"
153 # - set up the include handlers
155 AddOutputFilter INCLUDES .xsl
156 AddOutputFilter INCLUDES;XMLENT .xml
158 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
160 # This gives you the option to configure a different host to serve OPAC images from
161 # Specify the hostname (without protocol) and path to the images. Protocol will
162 # be determined at runtime
163 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
165 # In addition to loading images from a static host, you can also load CSS and/or
166 # Javascript from a static host or hosts. Protocol will be determined at runtime
167 # and/or by configuration options immediately following.
168 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
169 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
171 # If you are not able to serve static content via https and
172 # wish to force http:// (and are comfortable with mixed-content
173 # warnings in client browsers), set this:
174 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
176 # If you would prefer to fall back to your non-static servers for
177 # https pages, avoiding mixed-content warnings in client browsers
178 # and are willing to accept some increased server load, set this:
179 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
181 # Specify a ChiliFresh account to integrate their services with the OPAC
182 #SetEnv OILS_CHILIFRESH_ACCOUNT
183 #SetEnv OILS_CHILIFRESH_PROFILE
184 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
185 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
187 # Specify the initial script URL for Novelist (containing account credentials, etc.)
188 #SetEnv OILS_NOVELIST_URL
191 # Uncomment to force SSL any time a patron is logged in. This protects
192 # authentication tokens. Left commented out for backwards compat for now.
193 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
195 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
196 #SetEnv OILS_OPAC_COMBINED_JS 1
201 # ----------------------------------------------------------------------------------
202 # Some mod_deflate fun
203 # ----------------------------------------------------------------------------------
204 <IfModule mod_deflate.c>
205 SetOutputFilter DEFLATE
207 BrowserMatch ^Mozilla/4 gzip-only-text/html
208 BrowserMatch ^Mozilla/4\.0[678] no-gzip
209 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
211 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
213 <IfModule mod_headers.c>
214 Header append Vary User-Agent env=!dont-vary
221 # ----------------------------------------------------------------------------------
222 # Some mod_deflate fun
223 # ----------------------------------------------------------------------------------
224 <IfModule mod_deflate.c>
225 SetOutputFilter DEFLATE
227 BrowserMatch ^Mozilla/4 gzip-only-text/html
228 BrowserMatch ^Mozilla/4\.0[678] no-gzip
229 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
231 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
233 <IfModule mod_headers.c>
234 Header append Vary User-Agent env=!dont-vary
240 # ----------------------------------------------------------------------------------
241 # Force SSL on the OPAC's "My Account" page
242 # ----------------------------------------------------------------------------------
243 <LocationMatch .*/myopac.xml>
247 <LocationMatch /opac/extras/>
248 SSILegacyExprParser on
249 # Force to en-US for now to satisfy bbags.xml
252 AddOutputFilter INCLUDES .xml
253 AddType application/xhtml+xml .xml
256 RewriteCond %{QUERY_STRING} locale=([^&]*)
257 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
258 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
259 AddOutputFilter INCLUDES;XMLENT .html
262 # ----------------------------------------------------------------------------------
263 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
264 # ----------------------------------------------------------------------------------
265 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
266 # Default to en-US if we haven't matched a locale of the form xx-YY
267 RewriteRule .? - [S=4]
268 RewriteRule ^/xul/ - [E=locale:en-US]
269 RewriteRule ^/reports/ - [E=locale:en-US]
270 RewriteRule .? - [E=locale:en-US]
271 RewriteRule .? - [S=3]
272 # Otherwise, set our real locale
273 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
274 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
275 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
277 <LocationMatch /xul/.*\.x?html$>
278 SSILegacyExprParser on
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$>
293 SSILegacyExprParser on
295 XMLEntContentType "application/vnd.mozilla.xul+xml"
296 AddOutputFilter INCLUDES;XMLENT .xul
301 # ----------------------------------------------------------------------------------
302 # Self-serve password interface
303 # ----------------------------------------------------------------------------------
304 <Location /opac/password>
305 SetHandler perl-script
306 PerlHandler OpenILS::WWW::PasswordReset::password_reset
311 # Force clients to use HTTPS
312 RewriteCond %{HTTPS} !=on [NC]
313 RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
316 # ----------------------------------------------------------------------------------
318 # ----------------------------------------------------------------------------------
319 <Location /opac/extras/oisbn>
320 SetHandler perl-script
321 PerlHandler OpenILS::WWW::SuperCat::oisbn
326 <Location /opac/extras/supercat>
327 SetHandler perl-script
328 PerlHandler OpenILS::WWW::SuperCat::supercat
333 <Location /opac/extras/unapi>
334 SetHandler perl-script
335 PerlHandler OpenILS::WWW::SuperCat::unapi
340 <Location /opac/extras/feed/bookbag>
341 SetHandler perl-script
342 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
347 <Location /opac/extras/opensearch>
348 SetHandler perl-script
349 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
354 <Location /opac/extras/sru>
355 SetHandler perl-script
356 PerlHandler OpenILS::WWW::SuperCat::sru_search
361 <Location /opac/extras/sru_auth>
362 SetHandler perl-script
363 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
368 <Location /opac/extras/feed/freshmeat>
369 SetHandler perl-script
370 PerlHandler OpenILS::WWW::SuperCat::changes_feed
375 <Location /opac/extras/browse>
376 SetHandler perl-script
377 PerlHandler OpenILS::WWW::SuperCat::string_browse
382 <Location /opac/extras/startwith>
383 SetHandler perl-script
384 PerlHandler OpenILS::WWW::SuperCat::string_startwith
390 # ----------------------------------------------------------------------------------
391 # Module for displaying OpenSRF API documentation
392 # ----------------------------------------------------------------------------------
393 <Location /opac/extras/docgen.xsl>
394 AddOutputFilter INCLUDES .xsl
397 # ----------------------------------------------------------------------------------
398 # Module for processing staff-client offline scripts lives here
399 # ----------------------------------------------------------------------------------
400 <Directory "@localstatedir@/cgi-bin/offline">
401 AddHandler cgi-script .pl
408 # ----------------------------------------------------------------------------------
409 # XXX Note, it's important to explicitly set the JSON encoding style
410 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
412 # ----------------------------------------------------------------------------------
413 # OpenSRF JSON legacy gateway
414 # ----------------------------------------------------------------------------------
416 SetHandler osrf_json_gateway_module
417 OSRFGatewayLegacyJSON "true"
420 # ----------------------------------------------------------------------------------
421 # New-style OpenSRF JSON gateway
422 # ----------------------------------------------------------------------------------
423 <Location /osrf-gateway-v1>
424 SetHandler osrf_json_gateway_module
425 OSRFGatewayLegacyJSON "false"
429 # ----------------------------------------------------------------------------------
430 # OpenSRF-over-HTTP translator
431 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
432 # ----------------------------------------------------------------------------------
433 <Location /osrf-http-translator>
434 SetHandler osrf_http_translator_module
438 # ----------------------------------------------------------------------------------
439 # The exporter lives here
440 # ----------------------------------------------------------------------------------
442 SetHandler perl-script
444 AuthName "Exporter Login"
445 PerlOptions +GlobalRequest
446 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
447 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
449 PerlHandler OpenILS::WWW::Exporter
455 <Location /opac/extras/merge_template>
456 SetHandler perl-script
458 AuthName "Batch Update Login"
459 PerlOptions +GlobalRequest
460 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
461 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
463 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
469 <Location /opac/extras/circ>
471 AuthName "Circ Extras Login"
472 PerlOptions +GlobalRequest
473 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
474 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
481 <Location /collections>
482 SetHandler perl-script
484 AuthName "Collections Login"
485 PerlOptions +GlobalRequest
486 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
487 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
495 # ----------------------------------------------------------------------------------
496 # Reporting output lives here
497 # ----------------------------------------------------------------------------------
498 <Location /reporter/>
500 AuthName "Report Login"
501 PerlOptions +GlobalRequest
502 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
503 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
510 # ----------------------------------------------------------------------------------
511 # Selfcheck interface
512 # ----------------------------------------------------------------------------------
513 <LocationMatch .*/selfcheck.xml>
515 AuthName "Self-check Login"
516 PerlOptions +GlobalRequest
517 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
518 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
526 # ----------------------------------------------------------------------------------
528 # ----------------------------------------------------------------------------------
529 <LocationMatch /reports>
530 SSILegacyExprParser on
532 AddOutputFilter INCLUDES;XMLENT .xhtml
535 # capture locale CGI param for /reports/fm_IDL.xml
536 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
537 RewriteCond %{QUERY_STRING} locale=([^&;]*)
538 RewriteRule . - [E=locale:%1]
540 <LocationMatch /reports/fm_IDL.xml>
541 IDLChunkStripPI "yes"
542 IDLChunkEscapeScript "no"
543 IDLChunkStripComments "yes"
544 IDLChunkStripDoctype "yes"
545 IDLChunkContentType "application/xml; charset=utf-8"
546 AddOutputFilter INCLUDES;IDLCHUNK .xml
549 # ----------------------------------------------------------------------------------
551 # ----------------------------------------------------------------------------------
553 SetHandler perl-script
554 PerlHandler OpenILS::WWW::EDI
560 # ----------------------------------------------------------------------------------
562 # ----------------------------------------------------------------------------------
564 SetHandler perl-script
565 PerlHandler OpenILS::WWW::XMLRPCGateway
571 # ----------------------------------------------------------------------------------
572 # Conify - next-generation Evergreen administration interface
573 # ----------------------------------------------------------------------------------
574 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
576 SSILegacyExprParser on
579 XMLEntEscapeScript "no"
580 XMLEntStripComments "no"
581 XMLEntContentType "text/html; charset=utf-8"
582 AddOutputFilter INCLUDES;XMLENT .html
585 AuthName "Dojo Admin Login"
586 PerlOptions +GlobalRequest
587 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
588 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
595 <Location /vandelay-upload>
596 SetHandler perl-script
597 PerlHandler OpenILS::WWW::Vandelay::spool_marc
602 # OpenURL 0.1 searching based on OpenSearch
603 RewriteMap openurl prg:@bindir@/openurl_map.pl
604 RewriteCond %{QUERY_STRING} (^.*$)
605 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
609 # General Evergreen web template processor
611 SetHandler perl-script
612 PerlHandler OpenILS::WWW::EGWeb
617 PerlSetVar OILSWebBasePath "/eg"
618 PerlSetVar OILSWebWebDir "@localstatedir@/web"
619 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
621 # Enable Template-Toolkit error debugging messages (apache error log)
622 PerlSetVar OILSWebDebugTemplate "true"
624 # -------------------------------------------------------
625 # Media Prefix. In the 3rd example, the protocol (http) is enforced
626 #PerlSetVar OILSWebMediaPrefix "/media"
627 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
628 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
630 # Locale messages files:
632 # These appear in pairs; the first represents the user agent
633 # Accept-Language header locale, and the second represents
634 # the fully-qualified path for the corresponding PO file that
635 # contains the messages.
637 # If you enable two or more locales, then users will be able to
638 # select their preferred locale from a locale picker in the TPAC.
640 #PerlAddVar OILSWebLocale "en"
641 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/messages.en.po"
642 #PerlAddVar OILSWebLocale "en_ca"
643 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/en-CA.po"
644 #PerlAddVar OILSWebLocale "fr_ca"
645 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/fr-CA.po"
647 # Set the default locale: defaults to en-US
648 #PerlAddVar OILSWebDefaultLocale "fr_ca"
650 # Templates will be loaded from the following paths in reverse order.
651 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
652 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
654 #-------------------------------------------------
655 # Added Content Configuration
656 #-------------------------------------------------
658 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
659 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
662 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
663 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
666 #SetEnv OILS_CHILIFRESH_ACCOUNT
667 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
668 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
671 # SetEnv OILS_NOVELIST_URL http://imageserver.ebscohost.com/novelistselect/ns2init.js
672 # SetEnv OILS_NOVELIST_PROFILE <profile>
673 # SetEnv OILS_NOVELIST_PASSWORD <password>
675 #-------------------------------------------------
677 <IfModule mod_deflate.c>
678 SetOutputFilter DEFLATE
679 BrowserMatch ^Mozilla/4 gzip-only-text/html
680 BrowserMatch ^Mozilla/4\.0[678] no-gzip
681 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
682 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
683 <IfModule mod_headers.c>
684 Header append Cache-Control "public"
685 Header append Vary User-Agent env=!dont-vary
689 <LocationMatch ^/(images|css|js)/>
690 # should pick up the default expire time from eg.conf...
691 <IfModule mod_deflate.c>
692 SetOutputFilter DEFLATE
693 BrowserMatch ^Mozilla/4 gzip-only-text/html
694 BrowserMatch ^Mozilla/4\.0[678] no-gzip
695 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
696 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
697 <IfModule mod_headers.c>
698 Header append Cache-Control "public"
699 Header append Vary User-Agent env=!dont-vary
704 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
705 # Expire the HTML quickly since we're loading dynamic data for each page
707 ExpiresByType text/html "access plus 5 seconds"
710 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
711 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
713 ExpiresByType text/html "access plus 5 seconds"
716 # Note: the template processor will decline handling anything it does not
717 # have an explicit configuration for, which means it will fall back to
718 # Apache to serve the file. However, in the interest of speed, go ahead
719 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
720 # Add more exemptions as needed.
721 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
725 # ----------------------------------------------------------------------------------
726 # Some mod_deflate logging setup
727 # ----------------------------------------------------------------------------------
728 <IfModule mod_deflate.c>
729 DeflateFilterNote Input instream
730 DeflateFilterNote Output outstream
731 DeflateFilterNote Ratio ratio
733 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
734 CustomLog /var/log/apache2/deflate_log deflate
736 # There are problems with XMLENT and mod_deflate - so lets disable it
737 # This is where we don't have a pre-existing LocationMatch directive earlier
738 <LocationMatch /opac/.*\.xml$>
741 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
744 <LocationMatch /reports/.*\.xhtml$>
747 <LocationMatch /conify/.*\.html$>
755 SetHandler perl-script
756 PerlHandler OpenILS::WWW::IDL2js
761 <IfModule mod_headers.c>
762 Header append Cache-Control "public"
765 <IfModule mod_deflate.c>
766 SetOutputFilter DEFLATE
767 BrowserMatch ^Mozilla/4 gzip-only-text/html
768 BrowserMatch ^Mozilla/4\.0[678] no-gzip
769 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
770 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
771 <IfModule mod_headers.c>
772 Header append Vary User-Agent env=!dont-vary
777 # Uncomment the following to force SSL for everything. Note that this defeats caching
778 # and you will suffer a performance hit.
779 #RewriteCond %{HTTPS} off
780 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]