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 <Location /opac/extras/ac/jacket>
78 ErrorDocument 404 /opac/images/blank.png
81 # ----------------------------------------------------------------------------------
82 # Add the row ID (RID) and date so we can make unAPI happy
83 # ----------------------------------------------------------------------------------
84 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
85 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
87 # ----------------------------------------------------------------------------------
88 # Pull the locale from the URL
89 # ----------------------------------------------------------------------------------
90 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
91 RewriteRule . - [E=locale:%1]
93 # ----------------------------------------------------------------------------------
94 # Rewrite JSPac->TPac with redirects
95 # ----------------------------------------------------------------------------------
97 # First things first, extract useful data
98 # And we are going to start with a "this is the JSPac" check on each of these:
99 # RewriteCond %{REQUEST_URI} ^/?opac/
101 # Basic (overall) search type, if present
102 # I am cheating and grabbing RT or TP because I dunno the difference between them.
103 RewriteCond %{REQUEST_URI} ^/opac/
104 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
105 RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
107 # Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
108 RewriteCond %{REQUEST_URI} ^/opac/
109 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
110 RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
112 # Search Location, if present
113 RewriteCond %{REQUEST_URI} ^/opac/
114 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
115 RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
118 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]
121 # /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
122 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
123 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]
126 # /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
127 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]
129 # Search Results Pages
130 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]
132 # Basic Search (STILL not doing advanced)
133 # Fallback! But only for things that end in xml, htm, or html
134 # Images, CSS, etc can stick around.
135 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]
137 # ----------------------------------------------------------------------------------
138 # For sanity reasons, default indexes to Off
139 # ----------------------------------------------------------------------------------
142 # ----------------------------------------------------------------------------------
144 # ----------------------------------------------------------------------------------
145 <LocationMatch /opac/>
146 AddType application/xhtml+xml .xml
148 # - configure mod_xmlent
150 XMLEntEscapeScript "no"
151 XMLEntStripComments "yes"
152 XMLEntContentType "text/html; charset=utf-8"
153 # forces quirks mode which we want for now
154 XMLEntStripDoctype "yes"
156 # - set up the include handlers
158 AddOutputFilter INCLUDES .xsl
159 AddOutputFilter INCLUDES;XMLENT .xml
161 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
163 # This gives you the option to configure a different host to serve OPAC images from
164 # Specify the hostname (without protocol) and path to the images. Protocol will
165 # be determined at runtime
166 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
168 # In addition to loading images from a static host, you can also load CSS and/or
169 # Javascript from a static host or hosts. Protocol will be determined at runtime
170 # and/or by configuration options immediately following.
171 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
172 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
174 # If you are not able to serve static content via https and
175 # wish to force http:// (and are comfortable with mixed-content
176 # warnings in client browsers), set this:
177 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
179 # If you would prefer to fall back to your non-static servers for
180 # https pages, avoiding mixed-content warnings in client browsers
181 # and are willing to accept some increased server load, set this:
182 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
184 # Specify a ChiliFresh account to integrate their services with the OPAC
185 #SetEnv OILS_CHILIFRESH_ACCOUNT
186 #SetEnv OILS_CHILIFRESH_PROFILE
187 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
188 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
190 # Specify the initial script URL for Novelist (containing account credentials, etc.)
191 #SetEnv OILS_NOVELIST_URL
194 # Uncomment to force SSL any time a patron is logged in. This protects
195 # authentication tokens. Left commented out for backwards compat for now.
196 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
198 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
199 #SetEnv OILS_OPAC_COMBINED_JS 1
204 # ----------------------------------------------------------------------------------
205 # Some mod_deflate fun
206 # ----------------------------------------------------------------------------------
207 <IfModule mod_deflate.c>
208 SetOutputFilter DEFLATE
210 BrowserMatch ^Mozilla/4 gzip-only-text/html
211 BrowserMatch ^Mozilla/4\.0[678] no-gzip
212 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
214 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
216 <IfModule mod_headers.c>
217 Header append Vary User-Agent env=!dont-vary
224 # ----------------------------------------------------------------------------------
225 # Some mod_deflate fun
226 # ----------------------------------------------------------------------------------
227 <IfModule mod_deflate.c>
228 SetOutputFilter DEFLATE
230 BrowserMatch ^Mozilla/4 gzip-only-text/html
231 BrowserMatch ^Mozilla/4\.0[678] no-gzip
232 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
234 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
236 <IfModule mod_headers.c>
237 Header append Vary User-Agent env=!dont-vary
243 # ----------------------------------------------------------------------------------
244 # Force SSL on the OPAC's "My Account" page
245 # ----------------------------------------------------------------------------------
246 <LocationMatch .*/myopac.xml>
250 <LocationMatch /opac/extras/>
251 # Force to en-US for now to satisfy bbags.xml
254 AddOutputFilter INCLUDES .xml
255 AddType application/xhtml+xml .xml
258 RewriteCond %{QUERY_STRING} locale=([^&]*)
259 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
260 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
261 AddOutputFilter INCLUDES;XMLENT .html
264 # ----------------------------------------------------------------------------------
265 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
266 # ----------------------------------------------------------------------------------
267 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
268 # Default to en-US if we haven't matched a locale of the form xx-YY
269 RewriteRule .? - [S=4]
270 RewriteRule ^/xul/ - [E=locale:en-US]
271 RewriteRule ^/reports/ - [E=locale:en-US]
272 RewriteRule .? - [E=locale:en-US]
273 RewriteRule .? - [S=3]
274 # Otherwise, set our real locale
275 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
276 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
277 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
279 <LocationMatch /xul/.*\.x?html$>
281 XMLEntEscapeScript "no"
282 XMLEntStripComments "yes"
284 XMLEntStripDoctype "yes"
285 XMLEntContentType "text/html; charset=utf-8"
286 AddOutputFilter INCLUDES;XMLENT .xhtml
287 AddOutputFilter INCLUDES;XMLENT .html
293 <LocationMatch /xul/.*\.xul$>
295 XMLEntContentType "application/vnd.mozilla.xul+xml"
296 AddOutputFilter INCLUDES;XMLENT .xul
301 # ----------------------------------------------------------------------------------
303 # ----------------------------------------------------------------------------------
304 <Location /opac/extras/oisbn>
305 SetHandler perl-script
306 PerlHandler OpenILS::WWW::SuperCat::oisbn
311 <Location /opac/extras/supercat>
312 SetHandler perl-script
313 PerlHandler OpenILS::WWW::SuperCat::supercat
318 <Location /opac/extras/unapi>
319 SetHandler perl-script
320 PerlHandler OpenILS::WWW::SuperCat::unapi
325 <Location /opac/extras/feed/bookbag>
326 SetHandler perl-script
327 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
332 <Location /opac/extras/opensearch>
333 SetHandler perl-script
334 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
339 <Location /opac/extras/sru>
340 SetHandler perl-script
341 PerlHandler OpenILS::WWW::SuperCat::sru_search
346 <Location /opac/extras/sru_auth>
347 SetHandler perl-script
348 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
353 <Location /opac/extras/feed/freshmeat>
354 SetHandler perl-script
355 PerlHandler OpenILS::WWW::SuperCat::changes_feed
360 <Location /opac/extras/browse>
361 SetHandler perl-script
362 PerlHandler OpenILS::WWW::SuperCat::string_browse
367 <Location /opac/extras/startwith>
368 SetHandler perl-script
369 PerlHandler OpenILS::WWW::SuperCat::string_startwith
375 # ----------------------------------------------------------------------------------
376 # Module for displaying OpenSRF API documentation
377 # ----------------------------------------------------------------------------------
378 <Location /opac/extras/docgen.xsl>
379 AddOutputFilter INCLUDES .xsl
382 # ----------------------------------------------------------------------------------
383 # Module for processing staff-client offline scripts lives here
384 # ----------------------------------------------------------------------------------
385 <Directory "@localstatedir@/cgi-bin/offline">
386 AddHandler cgi-script .pl
393 # ----------------------------------------------------------------------------------
394 # XXX Note, it's important to explicitly set the JSON encoding style
395 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
397 # ----------------------------------------------------------------------------------
398 # OpenSRF JSON legacy gateway
399 # ----------------------------------------------------------------------------------
401 SetHandler osrf_json_gateway_module
402 OSRFGatewayLegacyJSON "true"
405 # ----------------------------------------------------------------------------------
406 # New-style OpenSRF JSON gateway
407 # ----------------------------------------------------------------------------------
408 <Location /osrf-gateway-v1>
409 SetHandler osrf_json_gateway_module
410 OSRFGatewayLegacyJSON "false"
414 # ----------------------------------------------------------------------------------
415 # OpenSRF-over-HTTP translator
416 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
417 # ----------------------------------------------------------------------------------
418 <Location /osrf-http-translator>
419 SetHandler osrf_http_translator_module
423 # ----------------------------------------------------------------------------------
424 # The exporter lives here
425 # ----------------------------------------------------------------------------------
427 SetHandler perl-script
429 AuthName "Exporter Login"
430 PerlOptions +GlobalRequest
431 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
432 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
434 PerlHandler OpenILS::WWW::Exporter
440 <Location /opac/extras/merge_template>
441 SetHandler perl-script
443 AuthName "Batch Update Login"
444 PerlOptions +GlobalRequest
445 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
446 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
448 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
454 <Location /opac/extras/circ>
456 AuthName "Circ Extras Login"
457 PerlOptions +GlobalRequest
458 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
459 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
466 <Location /collections>
467 SetHandler perl-script
469 AuthName "Collections Login"
470 PerlOptions +GlobalRequest
471 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
472 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
480 # ----------------------------------------------------------------------------------
481 # Reporting output lives here
482 # ----------------------------------------------------------------------------------
483 <Location /reporter/>
485 AuthName "Report Login"
486 PerlOptions +GlobalRequest
487 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
488 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
495 # ----------------------------------------------------------------------------------
496 # Selfcheck interface
497 # ----------------------------------------------------------------------------------
498 <LocationMatch .*/selfcheck.xml>
500 AuthName "Self-check Login"
501 PerlOptions +GlobalRequest
502 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
503 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
511 # ----------------------------------------------------------------------------------
513 # ----------------------------------------------------------------------------------
514 <LocationMatch /reports>
516 AddOutputFilter INCLUDES;XMLENT .xhtml
519 # capture locale CGI param for /reports/fm_IDL.xml
520 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
521 RewriteCond %{QUERY_STRING} locale=([^&;]*)
522 RewriteRule . - [E=locale:%1]
524 <LocationMatch /reports/fm_IDL.xml>
525 IDLChunkStripPI "yes"
526 IDLChunkEscapeScript "no"
527 IDLChunkStripComments "yes"
528 IDLChunkStripDoctype "yes"
529 IDLChunkContentType "application/xml; charset=utf-8"
530 AddOutputFilter INCLUDES;IDLCHUNK .xml
533 # ----------------------------------------------------------------------------------
535 # ----------------------------------------------------------------------------------
537 SetHandler perl-script
538 PerlHandler OpenILS::WWW::EDI
544 # ----------------------------------------------------------------------------------
546 # ----------------------------------------------------------------------------------
548 SetHandler perl-script
549 PerlHandler OpenILS::WWW::XMLRPCGateway
553 <IfModule mod_headers.c>
554 Header onsuccess set Cache-Control no-cache
558 # ----------------------------------------------------------------------------------
559 # Conify - next-generation Evergreen administration interface
560 # ----------------------------------------------------------------------------------
561 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
565 XMLEntEscapeScript "no"
566 XMLEntStripComments "no"
567 XMLEntContentType "text/html; charset=utf-8"
568 AddOutputFilter INCLUDES;XMLENT .html
571 AuthName "Dojo Admin Login"
572 PerlOptions +GlobalRequest
573 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
574 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
581 # ----------------------------------------------------------------------------------
582 # The PhoneList lives here
583 # ----------------------------------------------------------------------------------
584 <Location /phonelist>
585 SetHandler perl-script
587 AuthName "PhoneList Login"
589 PerlOptions +GlobalRequest
590 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
591 PerlHandler OpenILS::WWW::PhoneList
592 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
596 <IfModule mod_headers.c>
597 Header onsuccess set Cache-Control no-cache
600 <Location /vandelay-upload>
601 SetHandler perl-script
602 PerlHandler OpenILS::WWW::Vandelay::spool_marc
607 # OpenURL 0.1 searching based on OpenSearch
608 RewriteMap openurl prg:@bindir@/openurl_map.pl
609 RewriteCond %{QUERY_STRING} (^.*$)
610 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
614 # General Evergreen web template processor
616 SetHandler perl-script
617 PerlHandler OpenILS::WWW::EGWeb
622 PerlSetVar OILSWebBasePath "/eg"
623 PerlSetVar OILSWebWebDir "@localstatedir@/web"
624 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
626 # Enable Template-Toolkit error debugging messages (apache error log)
627 PerlSetVar OILSWebDebugTemplate "true"
629 # -------------------------------------------------------
630 # Media Prefix. In the 3rd example, the protocol (http) is enforced
631 #PerlSetVar OILSWebMediaPrefix "/media"
632 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
633 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
635 # Locale messages files:
637 # These appear in pairs; the first represents the user agent
638 # Accept-Language header locale, and the second represents
639 # the fully-qualified path for the corresponding PO file that
640 # contains the messages.
642 # If you enable two or more locales, then users will be able to
643 # select their preferred locale from a locale picker in the TPAC.
645 #PerlAddVar OILSWebLocale "en"
646 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/messages.en.po"
647 #PerlAddVar OILSWebLocale "en_ca"
648 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/en-CA.po"
649 #PerlAddVar OILSWebLocale "fr_ca"
650 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/fr-CA.po"
652 # Set the default locale: defaults to en-US
653 #PerlAddVar OILSWebDefaultLocale "fr_ca"
655 # Templates will be loaded from the following paths in reverse order.
656 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
657 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
659 #-------------------------------------------------
660 # Added Content Configuration
661 #-------------------------------------------------
663 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
664 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
667 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
668 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
671 #SetEnv OILS_CHILIFRESH_ACCOUNT
672 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
673 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
674 #-------------------------------------------------
676 <IfModule mod_deflate.c>
677 SetOutputFilter DEFLATE
678 BrowserMatch ^Mozilla/4 gzip-only-text/html
679 BrowserMatch ^Mozilla/4\.0[678] no-gzip
680 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
681 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
682 <IfModule mod_headers.c>
683 Header append Cache-Control "public"
684 Header append Vary User-Agent env=!dont-vary
688 <LocationMatch ^/(images|css|js)/>
689 # should pick up the default expire time from eg.conf...
690 <IfModule mod_deflate.c>
691 SetOutputFilter DEFLATE
692 BrowserMatch ^Mozilla/4 gzip-only-text/html
693 BrowserMatch ^Mozilla/4\.0[678] no-gzip
694 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
695 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
696 <IfModule mod_headers.c>
697 Header append Cache-Control "public"
698 Header append Vary User-Agent env=!dont-vary
703 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
704 # Expire the HTML quickly since we're loading dynamic data for each page
706 ExpiresByType text/html "access plus 5 seconds"
709 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
710 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
712 ExpiresByType text/html "access plus 5 seconds"
715 # Note: the template processor will decline handling anything it does not
716 # have an explicit configuration for, which means it will fall back to
717 # Apache to serve the file. However, in the interest of speed, go ahead
718 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
719 # Add more exemptions as needed.
720 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
724 # ----------------------------------------------------------------------------------
725 # Some mod_deflate logging setup
726 # ----------------------------------------------------------------------------------
727 <IfModule mod_deflate.c>
728 DeflateFilterNote Input instream
729 DeflateFilterNote Output outstream
730 DeflateFilterNote Ratio ratio
732 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
733 CustomLog /var/log/apache2/deflate_log deflate
735 # There are problems with XMLENT and mod_deflate - so lets disable it
736 # This is where we don't have a pre-existing LocationMatch directive earlier
737 <LocationMatch /opac/.*\.xml$>
740 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
743 <LocationMatch /reports/.*\.xhtml$>
746 <LocationMatch /conify/.*\.html$>
754 SetHandler perl-script
755 PerlHandler OpenILS::WWW::IDL2js
760 <IfModule mod_headers.c>
761 Header append Cache-Control "public"
764 <IfModule mod_deflate.c>
765 SetOutputFilter DEFLATE
766 BrowserMatch ^Mozilla/4 gzip-only-text/html
767 BrowserMatch ^Mozilla/4\.0[678] no-gzip
768 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
769 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
770 <IfModule mod_headers.c>
771 Header append Vary User-Agent env=!dont-vary
776 # Uncomment the following to force SSL for everything. Note that this defeats caching
777 # and you will suffer a performance hit.
778 #RewriteCond %{HTTPS} off
779 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]