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 # First things first, extract useful data
137 # And we are going to start with a "this is the JSPac" check on each of these:
138 # RewriteCond %{REQUEST_URI} ^/?opac/
140 # Basic (overall) search type, if present
141 # I am cheating and grabbing RT or TP because I dunno the difference between them.
142 RewriteCond %{REQUEST_URI} ^/opac/
143 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
144 RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
146 # Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
147 RewriteCond %{REQUEST_URI} ^/opac/
148 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
149 RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
151 # Search Location, if present
152 RewriteCond %{REQUEST_URI} ^/opac/
153 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
154 RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
157 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]
160 # /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
161 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
162 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]
165 # /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
166 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]
168 # Search Results Pages
169 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]
171 # Basic Search (STILL not doing advanced)
172 # Fallback! But only for things that end in xml, htm, or html
173 # Images, CSS, etc can stick around.
174 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]
176 # -----------------------------------------------------------------------------$
177 # Force HTTPS for /eg/circ/selfcheck
178 # -----------------------------------------------------------------------------$
179 RewriteCond %{HTTPS} off
180 RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
182 # ----------------------------------------------------------------------------------
183 # For sanity reasons, default indexes to Off
184 # ----------------------------------------------------------------------------------
187 # ----------------------------------------------------------------------------------
189 # ----------------------------------------------------------------------------------
190 <LocationMatch /opac/>
191 AddType application/xhtml+xml .xml
193 # - configure mod_xmlent
195 XMLEntEscapeScript "no"
196 XMLEntStripComments "yes"
197 XMLEntContentType "text/html; charset=utf-8"
198 # forces quirks mode which we want for now
199 XMLEntStripDoctype "yes"
201 # - set up the include handlers
203 AddOutputFilter INCLUDES .xsl
204 AddOutputFilter INCLUDES;XMLENT .xml
206 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
208 # This gives you the option to configure a different host to serve OPAC images from
209 # Specify the hostname (without protocol) and path to the images. Protocol will
210 # be determined at runtime
211 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
213 # In addition to loading images from a static host, you can also load CSS and/or
214 # Javascript from a static host or hosts. Protocol will be determined at runtime
215 # and/or by configuration options immediately following.
216 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
217 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
219 # If you are not able to serve static content via https and
220 # wish to force http:// (and are comfortable with mixed-content
221 # warnings in client browsers), set this:
222 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
224 # If you would prefer to fall back to your non-static servers for
225 # https pages, avoiding mixed-content warnings in client browsers
226 # and are willing to accept some increased server load, set this:
227 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
229 # Specify a ChiliFresh account to integrate their services with the OPAC
230 #SetEnv OILS_CHILIFRESH_ACCOUNT
231 #SetEnv OILS_CHILIFRESH_PROFILE
232 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
233 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
235 # Specify the initial script URL for Novelist (containing account credentials, etc.)
236 #SetEnv OILS_NOVELIST_URL
239 # Uncomment to force SSL any time a patron is logged in. This protects
240 # authentication tokens. Left commented out for backwards compat for now.
241 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
243 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
244 #SetEnv OILS_OPAC_COMBINED_JS 1
249 # ----------------------------------------------------------------------------------
250 # Some mod_deflate fun
251 # ----------------------------------------------------------------------------------
252 <IfModule mod_deflate.c>
253 SetOutputFilter DEFLATE
255 BrowserMatch ^Mozilla/4 gzip-only-text/html
256 BrowserMatch ^Mozilla/4\.0[678] no-gzip
257 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
259 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
261 <IfModule mod_headers.c>
262 Header append Vary User-Agent env=!dont-vary
269 # ----------------------------------------------------------------------------------
270 # Some mod_deflate fun
271 # ----------------------------------------------------------------------------------
272 <IfModule mod_deflate.c>
273 SetOutputFilter DEFLATE
275 BrowserMatch ^Mozilla/4 gzip-only-text/html
276 BrowserMatch ^Mozilla/4\.0[678] no-gzip
277 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
279 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
281 <IfModule mod_headers.c>
282 Header append Vary User-Agent env=!dont-vary
288 # ----------------------------------------------------------------------------------
289 # Force SSL on the OPAC's "My Account" page
290 # ----------------------------------------------------------------------------------
291 <LocationMatch .*/myopac.xml>
295 RewriteCond %{QUERY_STRING} locale=([^&]*)
296 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/opac/%1/extras/slimpac/$1? [redirect]
297 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
298 AddOutputFilter INCLUDES;XMLENT .html
301 # ----------------------------------------------------------------------------------
302 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
303 # ----------------------------------------------------------------------------------
304 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
305 # Default to en-US if we haven't matched a locale of the form xx-YY
306 RewriteRule .? - [S=4]
307 RewriteRule ^/xul/ - [E=locale:en-US]
308 RewriteRule ^/reports/ - [E=locale:en-US]
309 RewriteRule .? - [E=locale:en-US]
310 RewriteRule .? - [S=3]
311 # Otherwise, set our real locale
312 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
313 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
314 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
316 <LocationMatch /xul/.*\.x?html$>
318 XMLEntEscapeScript "no"
319 XMLEntStripComments "yes"
321 XMLEntStripDoctype "yes"
322 XMLEntContentType "text/html; charset=utf-8"
323 AddOutputFilter INCLUDES;XMLENT .xhtml
324 AddOutputFilter INCLUDES;XMLENT .html
330 <LocationMatch /xul/.*\.xul$>
332 XMLEntContentType "application/vnd.mozilla.xul+xml"
333 AddOutputFilter INCLUDES;XMLENT .xul
338 # ----------------------------------------------------------------------------------
340 # ----------------------------------------------------------------------------------
341 <Location /opac/extras/oisbn>
342 SetHandler perl-script
343 PerlHandler OpenILS::WWW::SuperCat::oisbn
348 <Location /opac/extras/supercat>
349 SetHandler perl-script
350 PerlHandler OpenILS::WWW::SuperCat::supercat
355 <Location /opac/extras/unapi>
356 SetHandler perl-script
357 PerlHandler OpenILS::WWW::SuperCat::unapi
362 <Location /opac/extras/feed/bookbag>
363 SetHandler perl-script
364 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
369 <Location /opac/extras/opensearch>
370 SetHandler perl-script
371 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
376 <Location /opac/extras/sru>
377 SetHandler perl-script
378 PerlHandler OpenILS::WWW::SuperCat::sru_search
383 <Location /opac/extras/sru_auth>
384 SetHandler perl-script
385 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
390 <Location /opac/extras/feed/freshmeat>
391 SetHandler perl-script
392 PerlHandler OpenILS::WWW::SuperCat::changes_feed
397 <Location /opac/extras/browse>
398 SetHandler perl-script
399 PerlHandler OpenILS::WWW::SuperCat::string_browse
404 <Location /opac/extras/startwith>
405 SetHandler perl-script
406 PerlHandler OpenILS::WWW::SuperCat::string_startwith
412 # ----------------------------------------------------------------------------------
413 # Module for displaying OpenSRF API documentation
414 # ----------------------------------------------------------------------------------
415 <Location /opac/extras/docgen.xsl>
416 AddOutputFilter INCLUDES .xsl
419 # ----------------------------------------------------------------------------------
420 # Module for processing staff-client offline scripts lives here
421 # ----------------------------------------------------------------------------------
422 <Directory "@localstatedir@/cgi-bin/offline">
423 AddHandler cgi-script .pl
430 # ----------------------------------------------------------------------------------
431 # XXX Note, it's important to explicitly set the JSON encoding style
432 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
434 # ----------------------------------------------------------------------------------
435 # OpenSRF JSON legacy gateway
436 # ----------------------------------------------------------------------------------
438 SetHandler osrf_json_gateway_module
439 OSRFGatewayLegacyJSON "true"
442 # ----------------------------------------------------------------------------------
443 # New-style OpenSRF JSON gateway
444 # ----------------------------------------------------------------------------------
445 <Location /osrf-gateway-v1>
446 SetHandler osrf_json_gateway_module
447 OSRFGatewayLegacyJSON "false"
451 # ----------------------------------------------------------------------------------
452 # OpenSRF-over-HTTP translator
453 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
454 # ----------------------------------------------------------------------------------
455 <Location /osrf-http-translator>
456 SetHandler osrf_http_translator_module
460 # ----------------------------------------------------------------------------------
461 # The exporter lives here
462 # ----------------------------------------------------------------------------------
464 SetHandler perl-script
466 AuthName "Exporter Login"
467 PerlOptions +GlobalRequest
468 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
469 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
471 PerlHandler OpenILS::WWW::Exporter
477 <Location /opac/extras/merge_template>
478 SetHandler perl-script
480 AuthName "Batch Update Login"
481 PerlOptions +GlobalRequest
482 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
483 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
485 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
491 <Location /opac/extras/circ>
493 AuthName "Circ Extras Login"
494 PerlOptions +GlobalRequest
495 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
496 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
503 <Location /collections>
504 SetHandler perl-script
506 AuthName "Collections Login"
507 PerlOptions +GlobalRequest
508 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
509 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
516 # ----------------------------------------------------------------------------------
517 # Protect Standalone/Offline mode files from public view
518 # ----------------------------------------------------------------------------------
519 <Location /standalone/>
521 AuthName "Standalone Mode Login"
522 PerlOptions +GlobalRequest
523 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
524 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
531 # ----------------------------------------------------------------------------------
532 # Reporting output lives here
533 # ----------------------------------------------------------------------------------
534 <Location /reporter/>
536 AuthName "Report Login"
537 PerlOptions +GlobalRequest
538 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
539 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
546 # ----------------------------------------------------------------------------------
548 # ----------------------------------------------------------------------------------
549 <LocationMatch /reports.*\.x?html>
551 XMLEntContentType "text/html; charset=utf-8"
552 AddOutputFilter INCLUDES;XMLENT .xhtml
553 AddOutputFilter INCLUDES;XMLENT .html
556 <LocationMatch /reports>
558 AddOutputFilter INCLUDES;XMLENT .xhtml
561 # capture locale CGI param for /reports/fm_IDL.xml
562 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
563 RewriteCond %{QUERY_STRING} locale=([^&;]*)
564 RewriteRule . - [E=locale:%1]
566 <LocationMatch /reports/fm_IDL.xml>
567 IDLChunkStripPI "yes"
568 IDLChunkEscapeScript "no"
569 IDLChunkStripComments "yes"
570 IDLChunkStripDoctype "yes"
571 IDLChunkContentType "application/xml; charset=utf-8"
572 AddOutputFilter INCLUDES;IDLCHUNK .xml
576 # ----------------------------------------------------------------------------------
578 # ----------------------------------------------------------------------------------
580 SetHandler perl-script
581 PerlHandler OpenILS::WWW::EDI
587 # ----------------------------------------------------------------------------------
589 # ----------------------------------------------------------------------------------
591 SetHandler perl-script
592 PerlHandler OpenILS::WWW::XMLRPCGateway
596 <IfModule mod_headers.c>
597 Header onsuccess set Cache-Control no-cache
601 # ----------------------------------------------------------------------------------
602 # Conify - next-generation Evergreen administration interface
603 # ----------------------------------------------------------------------------------
604 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
608 XMLEntEscapeScript "no"
609 XMLEntStripComments "no"
610 XMLEntContentType "text/html; charset=utf-8"
611 AddOutputFilter INCLUDES;XMLENT .html
614 AuthName "Dojo Admin Login"
615 PerlOptions +GlobalRequest
616 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
617 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
624 # ----------------------------------------------------------------------------------
625 # The PhoneList lives here
626 # ----------------------------------------------------------------------------------
627 <Location /phonelist>
628 SetHandler perl-script
630 AuthName "PhoneList Login"
632 PerlOptions +GlobalRequest
633 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
634 PerlHandler OpenILS::WWW::PhoneList
635 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
639 <IfModule mod_headers.c>
640 Header onsuccess set Cache-Control no-cache
643 <Location /vandelay-upload>
644 SetHandler perl-script
645 PerlHandler OpenILS::WWW::Vandelay::spool_marc
650 # OpenURL 0.1 searching based on OpenSearch
651 RewriteMap openurl prg:@bindir@/openurl_map.pl
652 RewriteCond %{QUERY_STRING} (^.*$)
653 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
657 # General Evergreen web template processor
659 SetHandler perl-script
660 PerlHandler OpenILS::WWW::EGWeb
665 PerlSetVar OILSWebBasePath "/eg"
666 PerlSetVar OILSWebWebDir "@localstatedir@/web"
667 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
669 # Enable Template-Toolkit error debugging messages (apache error log)
670 PerlSetVar OILSWebDebugTemplate "false"
671 # local cache of compiled Template Toolkit templates
672 PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
673 # template TTL - how long, in seconds, that Template Toolkit
674 # waits to check for updated template files
675 #PerlSetVar OILSWebTemplateStatTTL 60
677 # -------------------------------------------------------
678 # Media Prefix. In the 3rd example, the protocol (http) is enforced
679 #PerlSetVar OILSWebMediaPrefix "/media"
680 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
681 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
683 # Locale messages files:
685 # These appear in pairs; the first represents the user agent
686 # Accept-Language header locale, and the second represents
687 # the fully-qualified path for the corresponding PO file that
688 # contains the messages.
690 # If you enable two or more locales, then users will be able to
691 # select their preferred locale from a locale picker in the TPAC.
693 #PerlAddVar OILSWebLocale "en"
694 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/messages.en.po"
695 #PerlAddVar OILSWebLocale "en_ca"
696 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/en-CA.po"
697 #PerlAddVar OILSWebLocale "fr_ca"
698 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/fr-CA.po"
700 # Set the default locale: defaults to en-US
701 #PerlAddVar OILSWebDefaultLocale "fr_ca"
703 # Templates will be loaded from the following paths in reverse order.
704 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
705 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
707 #-------------------------------------------------
708 # Added Content Configuration
709 #-------------------------------------------------
711 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
712 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
715 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
716 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
719 #SetEnv OILS_CHILIFRESH_ACCOUNT
720 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
721 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
722 #-------------------------------------------------
724 <IfModule mod_deflate.c>
725 SetOutputFilter DEFLATE
726 BrowserMatch ^Mozilla/4 gzip-only-text/html
727 BrowserMatch ^Mozilla/4\.0[678] no-gzip
728 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
729 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
730 <IfModule mod_headers.c>
731 Header append Cache-Control "public"
732 Header append Vary User-Agent env=!dont-vary
736 <LocationMatch ^/(images|css|js)/>
737 # should pick up the default expire time from eg.conf...
738 <IfModule mod_deflate.c>
739 SetOutputFilter DEFLATE
740 BrowserMatch ^Mozilla/4 gzip-only-text/html
741 BrowserMatch ^Mozilla/4\.0[678] no-gzip
742 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
743 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
744 <IfModule mod_headers.c>
745 Header append Cache-Control "public"
746 Header append Vary User-Agent env=!dont-vary
751 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
752 # Expire the HTML quickly since we're loading dynamic data for each page
754 ExpiresByType text/html "access plus 5 seconds"
757 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
758 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
760 ExpiresByType text/html "access plus 5 seconds"
763 # Note: the template processor will decline handling anything it does not
764 # have an explicit configuration for, which means it will fall back to
765 # Apache to serve the file. However, in the interest of speed, go ahead
766 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
767 # Add more exemptions as needed.
768 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
772 # ----------------------------------------------------------------------------------
773 # Some mod_deflate setup
774 # ----------------------------------------------------------------------------------
775 <IfModule mod_deflate.c>
776 ## optional logging for mod_deflate debugging
777 ##DeflateFilterNote Input instream
778 ##DeflateFilterNote Output outstream
779 ##DeflateFilterNote Ratio ratio
781 ##LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
782 ##CustomLog /var/log/apache2/deflate_log deflate
784 # There are problems with XMLENT and mod_deflate - so lets disable it
785 # This is where we don't have a pre-existing LocationMatch directive earlier
786 <LocationMatch /opac/.*\.xml$>
789 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
792 <LocationMatch /reports/.*\.xhtml$>
795 <LocationMatch /conify/.*\.html$>
803 SetHandler perl-script
804 PerlHandler OpenILS::WWW::IDL2js
809 <IfModule mod_headers.c>
810 Header append Cache-Control "public"
813 <IfModule mod_deflate.c>
814 SetOutputFilter DEFLATE
815 BrowserMatch ^Mozilla/4 gzip-only-text/html
816 BrowserMatch ^Mozilla/4\.0[678] no-gzip
817 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
818 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
819 <IfModule mod_headers.c>
820 Header append Vary User-Agent env=!dont-vary
825 <LocationMatch /eg/staff/>
828 PerlSetVar OILSWebStopAtIndex "true"
830 RewriteCond %{HTTPS} off
831 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
833 # sample staff-specific translation files
834 #PerlAddVar OILSWebLocale "en_ca"
835 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/en-CA.po"
836 #PerlAddVar OILSWebLocale "fr_ca"
837 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/fr-CA.po"
841 <IfModule mod_headers.c>
842 Header append Cache-Control "public"
844 <IfModule mod_deflate.c>
845 SetOutputFilter DEFLATE
846 BrowserMatch ^Mozilla/4 gzip-only-text/html
847 BrowserMatch ^Mozilla/4\.0[678] no-gzip
848 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
849 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
850 <IfModule mod_headers.c>
851 Header append Vary User-Agent env=!dont-vary
856 # Uncomment the following to force SSL for everything. Note that this defeats caching
857 # and you will suffer a performance hit.
858 #RewriteCond %{HTTPS} off
859 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]