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 # Redirect staff to the correct URL if they forget to include the final /
13 # ----------------------------------------------------------------------------------
14 RedirectMatch 301 ^/eg/staff$ /eg/staff/
16 # ----------------------------------------------------------------------------------
17 # Point / to the IP address redirector
18 # ----------------------------------------------------------------------------------
20 # SetHandler perl-script
21 # PerlHandler OpenILS::WWW::Redirect
24 # #PerlSetVar OILSRedirectSkin "default"
25 # # OILSRedirectDepth defaults to the depth of the branch that the OPAC was directed to
26 # #PerlSetVar OILSRedirectDepth "0"
27 # #PerlSetVar OILSRedirectLocale "en-US"
28 # # Use the template-toolkit opac
29 # #PerlSetVar OILSRedirectTpac "true"
34 # ----------------------------------------------------------------------------------
35 # Assign a default locale to the accessible OPAC
36 # ----------------------------------------------------------------------------------
37 RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpac/start.html
38 RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html
40 # ----------------------------------------------------------------------------------
41 # Configure the gateway and translator
42 # ----------------------------------------------------------------------------------
43 OSRFGatewayConfig @sysconfdir@/opensrf_core.xml
44 OSRFTranslatorConfig @sysconfdir@/opensrf_core.xml
45 # Translator memcache server. Default is localhost
46 # OSRFTranslatorCacheServer 127.0.0.1:11211
49 # ----------------------------------------------------------------------------------
50 # Added content plugin
51 # ----------------------------------------------------------------------------------
52 <Location /opac/extras/ac/>
53 SetHandler perl-script
54 PerlHandler OpenILS::WWW::AddedContent
60 # Lock clearing cache down to STAFF_LOGIN
61 <Location /opac/extras/ac/clearcache/>
62 PerlAccessHandler OpenILS::WWW::AccessHandler
63 PerlSetVar OILSAccessHandlerPermission "STAFF_LOGIN"
66 # Autosuggest for searches
67 <Location /opac/extras/autosuggest>
68 SetHandler perl-script
69 PerlHandler OpenILS::WWW::AutoSuggest
75 <Location /opac/extras/flattener>
76 SetHandler perl-script
77 PerlHandler OpenILS::WWW::FlatFielder
82 # ----------------------------------------------------------------------------------
83 # Replace broken cover images with a transparent GIF by default
84 # ----------------------------------------------------------------------------------
86 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
87 /opac/images/blank.png [P,L]
89 <Location /opac/extras/ac/jacket>
90 ErrorDocument 404 /opac/images/blank.png
93 # Uncomment one or more of these to have a "no image" image other than the blank
96 # Note: There are no default images provided for these, you will need to provide
97 # your own "no image" image(s).
99 #<Location /opac/extras/ac/jacket/small>
100 # ErrorDocument 404 /opac/images/noimage_small.png
103 #<Location /opac/extras/ac/jacket/medium>
104 # ErrorDocument 404 /opac/images/noimage_medium.png
107 #<Location /opac/extras/ac/jacket/large>
108 # ErrorDocument 404 /opac/images/noimage_large.png
111 # ----------------------------------------------------------------------------------
112 # Add the row ID (RID) and date so we can make unAPI happy
113 # ----------------------------------------------------------------------------------
114 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
115 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
117 # ----------------------------------------------------------------------------------
118 # Pull the locale from the URL
119 # ----------------------------------------------------------------------------------
120 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
121 RewriteRule . - [E=locale:%1]
123 # ----------------------------------------------------------------------------------
124 # Rewrite JSPac->TPac with redirects
125 # ----------------------------------------------------------------------------------
127 # First things first, extract useful data
128 # And we are going to start with a "this is the JSPac" check on each of these:
129 # RewriteCond %{REQUEST_URI} ^/?opac/
131 # Basic (overall) search type, if present
132 # I am cheating and grabbing RT or TP because I dunno the difference between them.
133 RewriteCond %{REQUEST_URI} ^/opac/
134 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
135 RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
137 # Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
138 RewriteCond %{REQUEST_URI} ^/opac/
139 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
140 RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
142 # Search Location, if present
143 RewriteCond %{REQUEST_URI} ^/opac/
144 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
145 RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
148 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]
151 # /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
152 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
153 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]
156 # /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
157 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]
159 # Search Results Pages
160 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]
162 # Basic Search (STILL not doing advanced)
163 # Fallback! But only for things that end in xml, htm, or html
164 # Images, CSS, etc can stick around.
165 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]
167 # -----------------------------------------------------------------------------$
168 # Force HTTPS for /eg/circ/selfcheck
169 # -----------------------------------------------------------------------------$
170 RewriteCond %{HTTPS} off
171 RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
173 # ----------------------------------------------------------------------------------
174 # For sanity reasons, default indexes to Off
175 # ----------------------------------------------------------------------------------
178 # ----------------------------------------------------------------------------------
180 # ----------------------------------------------------------------------------------
181 <LocationMatch /opac/>
182 AddType application/xhtml+xml .xml
184 # - configure mod_xmlent
186 XMLEntEscapeScript "no"
187 XMLEntStripComments "yes"
188 XMLEntContentType "text/html; charset=utf-8"
189 # forces quirks mode which we want for now
190 XMLEntStripDoctype "yes"
192 # - set up the include handlers
194 AddOutputFilter INCLUDES .xsl
195 AddOutputFilter INCLUDES;XMLENT .xml
197 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
199 # This gives you the option to configure a different host to serve OPAC images from
200 # Specify the hostname (without protocol) and path to the images. Protocol will
201 # be determined at runtime
202 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
204 # In addition to loading images from a static host, you can also load CSS and/or
205 # Javascript from a static host or hosts. Protocol will be determined at runtime
206 # and/or by configuration options immediately following.
207 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
208 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
210 # If you are not able to serve static content via https and
211 # wish to force http:// (and are comfortable with mixed-content
212 # warnings in client browsers), set this:
213 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
215 # If you would prefer to fall back to your non-static servers for
216 # https pages, avoiding mixed-content warnings in client browsers
217 # and are willing to accept some increased server load, set this:
218 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
220 # Specify a ChiliFresh account to integrate their services with the OPAC
221 #SetEnv OILS_CHILIFRESH_ACCOUNT
222 #SetEnv OILS_CHILIFRESH_PROFILE
223 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
224 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
226 # Specify the initial script URL for Novelist (containing account credentials, etc.)
227 #SetEnv OILS_NOVELIST_URL
230 # Uncomment to force SSL any time a patron is logged in. This protects
231 # authentication tokens. Left commented out for backwards compat for now.
232 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
234 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
235 #SetEnv OILS_OPAC_COMBINED_JS 1
240 # ----------------------------------------------------------------------------------
241 # Some mod_deflate fun
242 # ----------------------------------------------------------------------------------
243 <IfModule mod_deflate.c>
244 SetOutputFilter DEFLATE
246 BrowserMatch ^Mozilla/4 gzip-only-text/html
247 BrowserMatch ^Mozilla/4\.0[678] no-gzip
248 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
250 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
252 <IfModule mod_headers.c>
253 Header append Vary User-Agent env=!dont-vary
260 # ----------------------------------------------------------------------------------
261 # Some mod_deflate fun
262 # ----------------------------------------------------------------------------------
263 <IfModule mod_deflate.c>
264 SetOutputFilter DEFLATE
266 BrowserMatch ^Mozilla/4 gzip-only-text/html
267 BrowserMatch ^Mozilla/4\.0[678] no-gzip
268 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
270 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
272 <IfModule mod_headers.c>
273 Header append Vary User-Agent env=!dont-vary
279 # ----------------------------------------------------------------------------------
280 # Force SSL on the OPAC's "My Account" page
281 # ----------------------------------------------------------------------------------
282 <LocationMatch .*/myopac.xml>
286 RewriteCond %{QUERY_STRING} locale=([^&]*)
287 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
288 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
289 AddOutputFilter INCLUDES;XMLENT .html
292 # ----------------------------------------------------------------------------------
293 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
294 # ----------------------------------------------------------------------------------
295 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
296 # Default to en-US if we haven't matched a locale of the form xx-YY
297 RewriteRule .? - [S=4]
298 RewriteRule ^/xul/ - [E=locale:en-US]
299 RewriteRule ^/reports/ - [E=locale:en-US]
300 RewriteRule .? - [E=locale:en-US]
301 RewriteRule .? - [S=3]
302 # Otherwise, set our real locale
303 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
304 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
305 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
307 <LocationMatch /xul/.*\.x?html$>
309 XMLEntEscapeScript "no"
310 XMLEntStripComments "yes"
312 XMLEntStripDoctype "yes"
313 XMLEntContentType "text/html; charset=utf-8"
314 AddOutputFilter INCLUDES;XMLENT .xhtml
315 AddOutputFilter INCLUDES;XMLENT .html
321 <LocationMatch /xul/.*\.xul$>
323 XMLEntContentType "application/vnd.mozilla.xul+xml"
324 AddOutputFilter INCLUDES;XMLENT .xul
329 # ----------------------------------------------------------------------------------
331 # ----------------------------------------------------------------------------------
332 <Location /opac/extras/oisbn>
333 SetHandler perl-script
334 PerlHandler OpenILS::WWW::SuperCat::oisbn
339 <Location /opac/extras/supercat>
340 SetHandler perl-script
341 PerlHandler OpenILS::WWW::SuperCat::supercat
346 <Location /opac/extras/unapi>
347 SetHandler perl-script
348 PerlHandler OpenILS::WWW::SuperCat::unapi
353 <Location /opac/extras/feed/bookbag>
354 SetHandler perl-script
355 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
360 <Location /opac/extras/opensearch>
361 SetHandler perl-script
362 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
367 <Location /opac/extras/sru>
368 SetHandler perl-script
369 PerlHandler OpenILS::WWW::SuperCat::sru_search
374 <Location /opac/extras/sru_auth>
375 SetHandler perl-script
376 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
381 <Location /opac/extras/feed/freshmeat>
382 SetHandler perl-script
383 PerlHandler OpenILS::WWW::SuperCat::changes_feed
388 <Location /opac/extras/browse>
389 SetHandler perl-script
390 PerlHandler OpenILS::WWW::SuperCat::string_browse
395 <Location /opac/extras/startwith>
396 SetHandler perl-script
397 PerlHandler OpenILS::WWW::SuperCat::string_startwith
403 # ----------------------------------------------------------------------------------
404 # Module for displaying OpenSRF API documentation
405 # ----------------------------------------------------------------------------------
406 <Location /opac/extras/docgen.xsl>
407 AddOutputFilter INCLUDES .xsl
410 # ----------------------------------------------------------------------------------
411 # Module for processing staff-client offline scripts lives here
412 # ----------------------------------------------------------------------------------
413 <Directory "@localstatedir@/cgi-bin/offline">
414 AddHandler cgi-script .pl
421 # ----------------------------------------------------------------------------------
422 # XXX Note, it's important to explicitly set the JSON encoding style
423 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
425 # ----------------------------------------------------------------------------------
426 # OpenSRF JSON legacy gateway
427 # ----------------------------------------------------------------------------------
429 SetHandler osrf_json_gateway_module
430 OSRFGatewayLegacyJSON "true"
433 # ----------------------------------------------------------------------------------
434 # New-style OpenSRF JSON gateway
435 # ----------------------------------------------------------------------------------
436 <Location /osrf-gateway-v1>
437 SetHandler osrf_json_gateway_module
438 OSRFGatewayLegacyJSON "false"
442 # ----------------------------------------------------------------------------------
443 # OpenSRF-over-HTTP translator
444 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
445 # ----------------------------------------------------------------------------------
446 <Location /osrf-http-translator>
447 SetHandler osrf_http_translator_module
451 # ----------------------------------------------------------------------------------
452 # The exporter lives here
453 # ----------------------------------------------------------------------------------
455 SetHandler perl-script
457 AuthName "Exporter Login"
458 PerlOptions +GlobalRequest
459 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
460 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
462 PerlHandler OpenILS::WWW::Exporter
468 <Location /opac/extras/merge_template>
469 SetHandler perl-script
471 AuthName "Batch Update Login"
472 PerlOptions +GlobalRequest
473 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
474 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
476 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
482 <Location /opac/extras/circ>
484 AuthName "Circ Extras Login"
485 PerlOptions +GlobalRequest
486 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
487 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
494 <Location /collections>
495 SetHandler perl-script
497 AuthName "Collections Login"
498 PerlOptions +GlobalRequest
499 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
500 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
507 # ----------------------------------------------------------------------------------
508 # Protect Standalone/Offline mode files from public view
509 # ----------------------------------------------------------------------------------
510 <Location /standalone/>
512 AuthName "Standalone Mode Login"
513 PerlOptions +GlobalRequest
514 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
515 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
522 # ----------------------------------------------------------------------------------
523 # Reporting output lives here
524 # ----------------------------------------------------------------------------------
525 <Location /reporter/>
527 AuthName "Report Login"
528 PerlOptions +GlobalRequest
529 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
530 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
537 # ----------------------------------------------------------------------------------
539 # ----------------------------------------------------------------------------------
540 <LocationMatch /reports.*\.x?html>
542 XMLEntContentType "text/html; charset=utf-8"
543 AddOutputFilter INCLUDES;XMLENT .xhtml
544 AddOutputFilter INCLUDES;XMLENT .html
547 <LocationMatch /reports>
549 AddOutputFilter INCLUDES;XMLENT .xhtml
552 # capture locale CGI param for /reports/fm_IDL.xml
553 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
554 RewriteCond %{QUERY_STRING} locale=([^&;]*)
555 RewriteRule . - [E=locale:%1]
557 <LocationMatch /reports/fm_IDL.xml>
558 IDLChunkStripPI "yes"
559 IDLChunkEscapeScript "no"
560 IDLChunkStripComments "yes"
561 IDLChunkStripDoctype "yes"
562 IDLChunkContentType "application/xml; charset=utf-8"
563 AddOutputFilter INCLUDES;IDLCHUNK .xml
567 # ----------------------------------------------------------------------------------
569 # ----------------------------------------------------------------------------------
571 SetHandler perl-script
572 PerlHandler OpenILS::WWW::EDI
578 # ----------------------------------------------------------------------------------
580 # ----------------------------------------------------------------------------------
582 SetHandler perl-script
583 PerlHandler OpenILS::WWW::XMLRPCGateway
587 <IfModule mod_headers.c>
588 Header onsuccess set Cache-Control no-cache
592 # ----------------------------------------------------------------------------------
593 # Conify - next-generation Evergreen administration interface
594 # ----------------------------------------------------------------------------------
595 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
599 XMLEntEscapeScript "no"
600 XMLEntStripComments "no"
601 XMLEntContentType "text/html; charset=utf-8"
602 AddOutputFilter INCLUDES;XMLENT .html
605 AuthName "Dojo Admin Login"
606 PerlOptions +GlobalRequest
607 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
608 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
615 # ----------------------------------------------------------------------------------
616 # The PhoneList lives here
617 # ----------------------------------------------------------------------------------
618 <Location /phonelist>
619 SetHandler perl-script
621 AuthName "PhoneList Login"
623 PerlOptions +GlobalRequest
624 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
625 PerlHandler OpenILS::WWW::PhoneList
626 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
630 <IfModule mod_headers.c>
631 Header onsuccess set Cache-Control no-cache
634 <Location /vandelay-upload>
635 SetHandler perl-script
636 PerlHandler OpenILS::WWW::Vandelay::spool_marc
641 # OpenURL 0.1 searching based on OpenSearch
642 RewriteMap openurl prg:@bindir@/openurl_map.pl
643 RewriteCond %{QUERY_STRING} (^.*$)
644 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
648 # General Evergreen web template processor
650 SetHandler perl-script
651 PerlHandler OpenILS::WWW::EGWeb
656 PerlSetVar OILSWebBasePath "/eg"
657 PerlSetVar OILSWebWebDir "@localstatedir@/web"
658 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
660 # Enable Template-Toolkit error debugging messages (apache error log)
661 PerlSetVar OILSWebDebugTemplate "false"
662 # local cache of compiled Template Toolkit templates
663 PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
664 # template TTL - how long, in seconds, that Template Toolkit
665 # waits to check for updated template files
666 #PerlSetVar OILSWebTemplateStatTTL 60
668 # -------------------------------------------------------
669 # Media Prefix. In the 3rd example, the protocol (http) is enforced
670 #PerlSetVar OILSWebMediaPrefix "/media"
671 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
672 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
674 # Locale messages files:
676 # These appear in pairs; the first represents the user agent
677 # Accept-Language header locale, and the second represents
678 # the fully-qualified path for the corresponding PO file that
679 # contains the messages.
681 # If you enable two or more locales, then users will be able to
682 # select their preferred locale from a locale picker in the TPAC.
684 #PerlAddVar OILSWebLocale "en"
685 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/messages.en.po"
686 #PerlAddVar OILSWebLocale "en_ca"
687 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/en-CA.po"
688 #PerlAddVar OILSWebLocale "fr_ca"
689 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/fr-CA.po"
691 # Set the default locale: defaults to en-US
692 #PerlAddVar OILSWebDefaultLocale "fr_ca"
694 # Templates will be loaded from the following paths in reverse order.
695 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
696 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
698 #-------------------------------------------------
699 # Added Content Configuration
700 #-------------------------------------------------
702 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
703 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
706 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
707 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
710 #SetEnv OILS_CHILIFRESH_ACCOUNT
711 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
712 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
713 #-------------------------------------------------
715 <IfModule mod_deflate.c>
716 SetOutputFilter DEFLATE
717 BrowserMatch ^Mozilla/4 gzip-only-text/html
718 BrowserMatch ^Mozilla/4\.0[678] no-gzip
719 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
720 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
721 <IfModule mod_headers.c>
722 Header append Cache-Control "public"
723 Header append Vary User-Agent env=!dont-vary
727 <LocationMatch ^/(images|css|js)/>
728 # should pick up the default expire time from eg.conf...
729 <IfModule mod_deflate.c>
730 SetOutputFilter DEFLATE
731 BrowserMatch ^Mozilla/4 gzip-only-text/html
732 BrowserMatch ^Mozilla/4\.0[678] no-gzip
733 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
734 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
735 <IfModule mod_headers.c>
736 Header append Cache-Control "public"
737 Header append Vary User-Agent env=!dont-vary
742 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
743 # Expire the HTML quickly since we're loading dynamic data for each page
745 ExpiresByType text/html "access plus 5 seconds"
748 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
749 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
751 ExpiresByType text/html "access plus 5 seconds"
754 # Note: the template processor will decline handling anything it does not
755 # have an explicit configuration for, which means it will fall back to
756 # Apache to serve the file. However, in the interest of speed, go ahead
757 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
758 # Add more exemptions as needed.
759 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
763 # ----------------------------------------------------------------------------------
764 # Some mod_deflate setup
765 # ----------------------------------------------------------------------------------
766 <IfModule mod_deflate.c>
767 ## optional logging for mod_deflate debugging
768 ##DeflateFilterNote Input instream
769 ##DeflateFilterNote Output outstream
770 ##DeflateFilterNote Ratio ratio
772 ##LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
773 ##CustomLog /var/log/apache2/deflate_log deflate
775 # There are problems with XMLENT and mod_deflate - so lets disable it
776 # This is where we don't have a pre-existing LocationMatch directive earlier
777 <LocationMatch /opac/.*\.xml$>
780 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
783 <LocationMatch /reports/.*\.xhtml$>
786 <LocationMatch /conify/.*\.html$>
794 SetHandler perl-script
795 PerlHandler OpenILS::WWW::IDL2js
800 <IfModule mod_headers.c>
801 Header append Cache-Control "public"
804 <IfModule mod_deflate.c>
805 SetOutputFilter DEFLATE
806 BrowserMatch ^Mozilla/4 gzip-only-text/html
807 BrowserMatch ^Mozilla/4\.0[678] no-gzip
808 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
809 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
810 <IfModule mod_headers.c>
811 Header append Vary User-Agent env=!dont-vary
816 <LocationMatch /eg/staff/>
818 PerlSetVar OILSWebStopAtIndex "true"
820 RewriteCond %{HTTPS} off
821 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
823 # sample staff-specific translation files
824 #PerlAddVar OILSWebLocale "en_ca"
825 #PerlAddVar OILSWebLocale "/openils/var/data/locale/staff/en-CA.po"
826 #PerlAddVar OILSWebLocale "fr_ca"
827 #PerlAddVar OILSWebLocale "/openils/var/data/locale/staff/fr-CA.po"
831 <IfModule mod_headers.c>
832 Header append Cache-Control "public"
834 <IfModule mod_deflate.c>
835 SetOutputFilter DEFLATE
836 BrowserMatch ^Mozilla/4 gzip-only-text/html
837 BrowserMatch ^Mozilla/4\.0[678] no-gzip
838 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
839 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
840 <IfModule mod_headers.c>
841 Header append Vary User-Agent env=!dont-vary
846 # Uncomment the following to force SSL for everything. Note that this defeats caching
847 # and you will suffer a performance hit.
848 #RewriteCond %{HTTPS} off
849 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]