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 RewriteRule ^/$ %{REQUEST_SCHEME}://%{HTTP_HOST}/eg/opac/home [R=301,L]
11 # ----------------------------------------------------------------------------------
12 # Redirect staff to the correct URL if they forget to include the final /
13 # ----------------------------------------------------------------------------------
14 RewriteRule ^/eg/staff$ https://%{HTTP_HOST}/eg/staff/ [R=301,L]
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 RewriteRule ^/opac/extras/slimpac/start.html$ %{REQUEST_SCHEME}://%{HTTP_HOST}/opac/en-US/extras/slimpac/start.html [R=301,L]
38 RewriteRule ^/opac/extras/slimpac/advanced.html$ %{REQUEST_SCHEME}://%{HTTP_HOST}/opac/en-US/extras/slimpac/advanced.html [R=301,L]
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
48 # ----------------------------------------------------------------------------------
50 # ----------------------------------------------------------------------------------
52 # handler for redacting URL query parameters from
54 PerlLogHandler OpenILS::WWW::EGWeb::log_handler
55 PerlAddVar OILSUrlParamToRedact "geographic-location"
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 # Uncomment this section to enable the OAI2 provider service.
92 #<Location /opac/extras/oai>
93 # SetHandler perl-script
94 # PerlHandler OpenILS::WWW::SuperCat::OAI
100 # ----------------------------------------------------------------------------------
101 # Replace broken cover images with a transparent GIF by default
102 # ----------------------------------------------------------------------------------
104 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
105 /opac/images/blank.png [P,L]
107 <Location /opac/extras/ac/jacket>
108 ErrorDocument 404 /opac/images/blank.png
111 # Uncomment one or more of these to have a "no image" image other than the blank
114 # Note: There are no default images provided for these, you will need to provide
115 # your own "no image" image(s).
117 #<Location /opac/extras/ac/jacket/small>
118 # ErrorDocument 404 /opac/images/noimage_small.png
121 #<Location /opac/extras/ac/jacket/medium>
122 # ErrorDocument 404 /opac/images/noimage_medium.png
125 #<Location /opac/extras/ac/jacket/large>
126 # ErrorDocument 404 /opac/images/noimage_large.png
129 # ----------------------------------------------------------------------------------
130 # Add the row ID (RID) and date so we can make unAPI happy
131 # ----------------------------------------------------------------------------------
132 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
133 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
135 # ----------------------------------------------------------------------------------
136 # Pull the locale from the URL
137 # ----------------------------------------------------------------------------------
138 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
139 RewriteRule . - [E=locale:%1]
141 # ----------------------------------------------------------------------------------
142 # Rewrite JSPac->TPac with redirects
143 # ----------------------------------------------------------------------------------
145 RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml %{REQUEST_SCHEME}://%{HTTP_HOST}/eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
147 # -----------------------------------------------------------------------------$
148 # Force HTTPS for /eg/circ/selfcheck
149 # -----------------------------------------------------------------------------$
150 RewriteCond %{HTTPS} off
151 RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
153 # ----------------------------------------------------------------------------------
154 # For sanity reasons, default indexes to Off
155 # ----------------------------------------------------------------------------------
158 # ----------------------------------------------------------------------------------
160 # ----------------------------------------------------------------------------------
161 <LocationMatch /opac/>
162 SSILegacyExprParser on
163 AddType application/xhtml+xml .xml
165 # - configure mod_xmlent
167 XMLEntEscapeScript "no"
168 XMLEntStripComments "yes"
169 XMLEntContentType "text/html; charset=utf-8"
170 # forces quirks mode which we want for now
171 XMLEntStripDoctype "yes"
173 # - set up the include handlers
175 AddOutputFilter INCLUDES .xsl
176 AddOutputFilter INCLUDES;XMLENT .xml
178 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
180 # This gives you the option to configure a different host to serve OPAC images from
181 # Specify the hostname (without protocol) and path to the images. Protocol will
182 # be determined at runtime
183 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
185 # In addition to loading images from a static host, you can also load CSS and/or
186 # Javascript from a static host or hosts. Protocol will be determined at runtime
187 # and/or by configuration options immediately following.
188 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
189 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
191 # If you are not able to serve static content via https and
192 # wish to force http:// (and are comfortable with mixed-content
193 # warnings in client browsers), set this:
194 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
196 # If you would prefer to fall back to your non-static servers for
197 # https pages, avoiding mixed-content warnings in client browsers
198 # and are willing to accept some increased server load, set this:
199 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
201 # Specify a ChiliFresh account to integrate their services with the OPAC
202 #SetEnv OILS_CHILIFRESH_ACCOUNT
203 #SetEnv OILS_CHILIFRESH_PROFILE
204 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
205 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
207 # Specify the initial script URL for Novelist (containing account credentials, etc.)
208 #SetEnv OILS_NOVELIST_URL
209 #SetEnv OILS_NOVELIST_PROFILE
210 #SetEnv OILS_NOVELIST_PASSWORD
212 # Uncomment to force SSL any time a patron is logged in. This protects
213 # authentication tokens. Left commented out for backwards compat for now.
214 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
216 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
217 #SetEnv OILS_OPAC_COMBINED_JS 1
222 # ----------------------------------------------------------------------------------
223 # Some mod_deflate fun
224 # ----------------------------------------------------------------------------------
225 <IfModule mod_deflate.c>
226 SetOutputFilter DEFLATE
228 BrowserMatch ^Mozilla/4 gzip-only-text/html
229 BrowserMatch ^Mozilla/4\.0[678] no-gzip
230 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
232 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
234 <IfModule mod_headers.c>
235 Header append Vary User-Agent env=!dont-vary
242 # ----------------------------------------------------------------------------------
243 # Some mod_deflate fun
244 # ----------------------------------------------------------------------------------
245 <IfModule mod_deflate.c>
246 SetOutputFilter DEFLATE
248 BrowserMatch ^Mozilla/4 gzip-only-text/html
249 BrowserMatch ^Mozilla/4\.0[678] no-gzip
250 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
252 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
254 <IfModule mod_headers.c>
255 Header append Vary User-Agent env=!dont-vary
261 # ----------------------------------------------------------------------------------
262 # Force SSL on the OPAC's "My Account" page
263 # ----------------------------------------------------------------------------------
264 <LocationMatch .*/myopac.xml>
268 RewriteCond %{QUERY_STRING} locale=([^&]*)
269 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ %{REQUEST_SCHEME}://%{HTTP_HOST}/opac/%1/extras/slimpac/$1? [redirect]
270 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
271 AddOutputFilter INCLUDES;XMLENT .html
274 # ----------------------------------------------------------------------------------
275 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
276 # ----------------------------------------------------------------------------------
277 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
278 # Default to en-US if we haven't matched a locale of the form xx-YY
279 RewriteRule .? - [S=4]
280 RewriteRule ^/xul/ - [E=locale:en-US]
281 RewriteRule ^/reports/ - [E=locale:en-US]
282 RewriteRule .? - [E=locale:en-US]
283 RewriteRule .? - [S=3]
284 # Otherwise, set our real locale
285 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
286 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
287 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
289 <LocationMatch /xul/.*\.x?html$>
290 SSILegacyExprParser on
292 XMLEntEscapeScript "no"
293 XMLEntStripComments "yes"
295 XMLEntStripDoctype "yes"
296 XMLEntContentType "text/html; charset=utf-8"
297 AddOutputFilter INCLUDES;XMLENT .xhtml
298 AddOutputFilter INCLUDES;XMLENT .html
304 <LocationMatch /xul/.*\.xul$>
305 SSILegacyExprParser on
307 XMLEntContentType "application/vnd.mozilla.xul+xml"
308 AddOutputFilter INCLUDES;XMLENT .xul
313 # ----------------------------------------------------------------------------------
315 # ----------------------------------------------------------------------------------
316 <Location /opac/extras/oisbn>
317 SetHandler perl-script
318 PerlHandler OpenILS::WWW::SuperCat::oisbn
323 <Location /opac/extras/supercat>
324 SetHandler perl-script
325 PerlHandler OpenILS::WWW::SuperCat::supercat
330 <Location /opac/extras/unapi>
331 SetHandler perl-script
332 PerlHandler OpenILS::WWW::SuperCat::unapi
337 <Location /opac/extras/feed/bookbag>
338 SetHandler perl-script
339 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
344 <Location /opac/extras/opensearch>
345 SetHandler perl-script
346 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
351 <Location /opac/extras/sru>
352 SetHandler perl-script
353 PerlHandler OpenILS::WWW::SuperCat::sru_search
358 <Location /opac/extras/sru_auth>
359 SetHandler perl-script
360 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
365 <Location /opac/extras/feed/freshmeat>
366 SetHandler perl-script
367 PerlHandler OpenILS::WWW::SuperCat::changes_feed
372 <Location /opac/extras/browse>
373 SetHandler perl-script
374 PerlHandler OpenILS::WWW::SuperCat::string_browse
379 <Location /opac/extras/startwith>
380 SetHandler perl-script
381 PerlHandler OpenILS::WWW::SuperCat::string_startwith
387 # ----------------------------------------------------------------------------------
388 # Module for displaying OpenSRF API documentation
389 # ----------------------------------------------------------------------------------
390 <Location /opac/extras/docgen.xsl>
391 AddOutputFilter INCLUDES .xsl
394 # ----------------------------------------------------------------------------------
395 # Module for processing staff-client offline scripts lives here
396 # ----------------------------------------------------------------------------------
397 <Directory "@localstatedir@/cgi-bin/offline">
398 AddHandler cgi-script .pl
405 # ----------------------------------------------------------------------------------
406 # XXX Note, it's important to explicitly set the JSON encoding style
407 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
409 # ----------------------------------------------------------------------------------
410 # OpenSRF JSON legacy gateway
411 # ----------------------------------------------------------------------------------
413 SetHandler osrf_json_gateway_module
414 OSRFGatewayLegacyJSON "true"
417 # ----------------------------------------------------------------------------------
418 # New-style OpenSRF JSON gateway
419 # ----------------------------------------------------------------------------------
420 <Location /osrf-gateway-v1>
421 SetHandler osrf_json_gateway_module
422 OSRFGatewayLegacyJSON "false"
426 # ----------------------------------------------------------------------------------
427 # OpenSRF-over-HTTP translator
428 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
429 # ----------------------------------------------------------------------------------
431 # OPTIONAL: Running the translator behind a proxy requires accessing
432 # the client IP address via mod_remoteip (sudo a2enmod remoteip).
433 # Below is a sample configuration for a proxy running on the same
434 # server and passing the client IP address via the X-Forwarded-For header.
436 #RemoteIPInternalProxy 127.0.0.1/24
437 #RemoteIPInternalProxy ::1
438 #RemoteIPHeader X-Forwarded-For
440 <Location /osrf-http-translator>
441 SetHandler osrf_http_translator_module
445 # ----------------------------------------------------------------------------------
446 # The exporter lives here
447 # ----------------------------------------------------------------------------------
449 SetHandler perl-script
451 AuthName "Exporter Login"
452 PerlOptions +GlobalRequest
453 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
454 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
456 PerlHandler OpenILS::WWW::Exporter
461 <Location /opac/extras/merge_template>
462 SetHandler perl-script
464 AuthName "Batch Update Login"
465 PerlOptions +GlobalRequest
466 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
467 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
469 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
474 <Location /opac/extras/circ>
476 AuthName "Circ Extras Login"
477 PerlOptions +GlobalRequest
478 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
479 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
485 <Location /collections>
486 SetHandler perl-script
488 AuthName "Collections Login"
489 PerlOptions +GlobalRequest
490 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
491 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
497 # ----------------------------------------------------------------------------------
498 # Protect Standalone/Offline mode files from public view
499 # ----------------------------------------------------------------------------------
500 <Location /standalone/>
502 AuthName "Standalone Mode Login"
503 PerlOptions +GlobalRequest
504 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
505 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
512 # ----------------------------------------------------------------------------------
513 # Reporting output lives here
514 # ----------------------------------------------------------------------------------
515 <Location /reporter/>
517 AuthName "Report Login"
518 PerlOptions +GlobalRequest
519 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
520 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
526 # ----------------------------------------------------------------------------------
528 # ----------------------------------------------------------------------------------
529 <LocationMatch /reports.*\.x?html>
530 SSILegacyExprParser on
532 XMLEntContentType "text/html; charset=utf-8"
533 AddOutputFilter INCLUDES;XMLENT .xhtml
534 AddOutputFilter INCLUDES;XMLENT .html
537 <LocationMatch /reports>
538 SSILegacyExprParser on
540 AddOutputFilter INCLUDES;XMLENT .xhtml
543 # capture locale CGI param for /reports/fm_IDL.xml
544 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
545 RewriteCond %{QUERY_STRING} locale=([^&;]*)
546 RewriteRule . - [E=locale:%1]
548 <LocationMatch /reports/fm_IDL.xml>
549 IDLChunkStripPI "yes"
550 IDLChunkEscapeScript "no"
551 IDLChunkStripComments "yes"
552 IDLChunkStripDoctype "yes"
553 IDLChunkContentType "application/xml; charset=utf-8"
554 AddOutputFilter INCLUDES;IDLCHUNK .xml
558 # ----------------------------------------------------------------------------------
560 # ----------------------------------------------------------------------------------
562 SetHandler perl-script
563 PerlHandler OpenILS::WWW::EDI
569 # ----------------------------------------------------------------------------------
571 # ----------------------------------------------------------------------------------
573 SetHandler perl-script
574 PerlHandler OpenILS::WWW::XMLRPCGateway
578 <IfModule mod_headers.c>
579 Header onsuccess set Cache-Control no-cache
583 # ----------------------------------------------------------------------------------
584 # Conify - next-generation Evergreen administration interface
585 # ----------------------------------------------------------------------------------
586 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
588 SSILegacyExprParser on
591 XMLEntEscapeScript "no"
592 XMLEntStripComments "no"
593 XMLEntContentType "text/html; charset=utf-8"
594 AddOutputFilter INCLUDES;XMLENT .html
597 AuthName "Dojo Admin Login"
598 PerlOptions +GlobalRequest
599 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
600 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
606 # ----------------------------------------------------------------------------------
607 # The PhoneList lives here
608 # ----------------------------------------------------------------------------------
609 <Location /phonelist>
610 SetHandler perl-script
612 AuthName "PhoneList Login"
614 PerlOptions +GlobalRequest
615 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
616 PerlHandler OpenILS::WWW::PhoneList
617 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
620 <IfModule mod_headers.c>
621 Header onsuccess set Cache-Control no-cache
624 <Location /vandelay-upload>
625 SetHandler perl-script
626 PerlHandler OpenILS::WWW::Vandelay::spool_marc
630 <Location /jacket-upload>
631 SetHandler perl-script
632 PerlHandler OpenILS::WWW::Vandelay::spool_jacket
637 # OpenURL 0.1 searching based on OpenSearch
638 RewriteMap openurl prg:@bindir@/openurl_map.pl
639 RewriteCond %{QUERY_STRING} (^.*$)
640 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
644 # General Evergreen web template processor
646 SetHandler perl-script
647 PerlHandler OpenILS::WWW::EGWeb
652 PerlSetVar OILSWebBasePath "/eg"
653 PerlSetVar OILSWebWebDir "@localstatedir@/web"
654 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
656 # Port Apache listens on for HTTP traffic. Used for HTTP requests
657 # routed from Perl handlers back to the same Apache instance, like
658 # added content requests. Use this when running Apache with a
659 # non-standard port, typical with a proxy setup. Defaults to "80".
660 # PerlSetVar OILSWebInternalHTTPPort "7080"
662 # Enable Template-Toolkit error debugging messages (apache error log)
663 PerlSetVar OILSWebDebugTemplate "false"
664 # local cache of compiled Template Toolkit templates
665 PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
666 # template TTL - how long, in seconds, that Template Toolkit
667 # waits to check for updated template files
668 #PerlSetVar OILSWebTemplateStatTTL 60
670 # -------------------------------------------------------
671 # Media Prefix. In the 3rd example, the protocol (http) is enforced
672 #PerlSetVar OILSWebMediaPrefix "/media"
673 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
674 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
676 # Locale messages files:
678 # These appear in pairs; the first represents the user agent
679 # Accept-Language header locale, and the second represents
680 # the fully-qualified path for the corresponding PO file that
681 # contains the messages.
683 # If you enable two or more locales, then users will be able to
684 # select their preferred locale from a locale picker in the Bootstrap OPAC.
686 #PerlAddVar OILSWebLocale "en"
687 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/bootstrap-opac/messages.en.po"
688 #PerlAddVar OILSWebLocale "en_ca"
689 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/bootstrap-opac/en-CA.po"
690 #PerlAddVar OILSWebLocale "fr_ca"
691 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/bootstrap-opac/fr-CA.po"
693 # If you're using the TPAC OPAC, you should instead set the locales
695 #PerlAddVar OILSWebLocale "en"
696 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/messages.en.po"
697 #PerlAddVar OILSWebLocale "en_ca"
698 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/en-CA.po"
699 #PerlAddVar OILSWebLocale "fr_ca"
700 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/fr-CA.po"
702 # Set the default locale: defaults to en-US
703 #PerlAddVar OILSWebDefaultLocale "fr_ca"
705 # Templates will be loaded from the following paths in reverse order.
706 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
707 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates-bootstrap" # Comment this line out to use the legacy TPAC
708 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
710 #-------------------------------------------------
711 # Added Content Configuration
712 #-------------------------------------------------
714 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
715 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
718 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
719 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
722 #SetEnv OILS_CHILIFRESH_ACCOUNT
723 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
724 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
727 # SetEnv OILS_NOVELIST_URL http://imageserver.ebscohost.com/novelistselect/ns2init.js
728 # SetEnv OILS_NOVELIST_PROFILE <profile>
729 # SetEnv OILS_NOVELIST_PASSWORD <password>
731 #-------------------------------------------------
733 <IfModule mod_deflate.c>
734 SetOutputFilter DEFLATE
735 BrowserMatch ^Mozilla/4 gzip-only-text/html
736 BrowserMatch ^Mozilla/4\.0[678] no-gzip
737 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
738 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
739 <IfModule mod_headers.c>
740 Header append Cache-Control "public"
741 Header append Vary User-Agent env=!dont-vary
745 <LocationMatch ^/(images|css|js)/>
746 # should pick up the default expire time from eg.conf...
747 <IfModule mod_deflate.c>
748 SetOutputFilter DEFLATE
749 BrowserMatch ^Mozilla/4 gzip-only-text/html
750 BrowserMatch ^Mozilla/4\.0[678] no-gzip
751 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
752 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
753 <IfModule mod_headers.c>
754 Header append Cache-Control "public"
755 Header append Vary User-Agent env=!dont-vary
760 # Uncomment the entries below to enable Shibboleth authentication
764 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
765 # Expire the HTML quickly since we're loading dynamic data for each page
767 ExpiresByType text/html "access plus 5 seconds"
770 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
771 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
773 ExpiresByType text/html "access plus 5 seconds"
776 # Note: the template processor will decline handling anything it does not
777 # have an explicit configuration for, which means it will fall back to
778 # Apache to serve the file. However, in the interest of speed, go ahead
779 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
780 # Add more exemptions as needed.
781 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
785 # ----------------------------------------------------------------------------------
786 # Some mod_deflate setup
787 # ----------------------------------------------------------------------------------
788 <IfModule mod_deflate.c>
790 ## optional logging for mod_deflate debugging
791 ##DeflateFilterNote Input instream
792 ##DeflateFilterNote Output outstream
793 ##DeflateFilterNote Ratio ratio
795 ##LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
796 ##CustomLog /var/log/apache2/deflate_log deflate
798 # There are problems with XMLENT and mod_deflate - so lets disable it
799 # This is where we don't have a pre-existing LocationMatch directive earlier
800 <LocationMatch /opac/.*\.xml$>
803 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
806 <LocationMatch /reports/.*\.xhtml$>
809 <LocationMatch /conify/.*\.html$>
814 <Location /print_template>
815 SetHandler perl-script
816 PerlHandler OpenILS::WWW::PrintTemplate
825 SetHandler perl-script
826 PerlHandler OpenILS::WWW::IDL2js
831 <IfModule mod_headers.c>
832 Header append Cache-Control "public"
835 <IfModule mod_deflate.c>
836 SetOutputFilter DEFLATE
837 BrowserMatch ^Mozilla/4 gzip-only-text/html
838 BrowserMatch ^Mozilla/4\.0[678] no-gzip
839 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
840 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
841 <IfModule mod_headers.c>
842 Header append Vary User-Agent env=!dont-vary
847 <LocationMatch /eg/staff/>
849 PerlSetVar OILSWebStopAtIndex "true"
851 RewriteCond %{HTTPS} off
852 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
854 # sample staff-specific translation files
855 #PerlAddVar OILSWebLocale "en_ca"
856 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/en-CA.po"
857 #PerlAddVar OILSWebLocale "fr_ca"
858 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/fr-CA.po"
862 <IfModule mod_headers.c>
863 Header append Cache-Control "public"
865 <IfModule mod_deflate.c>
866 SetOutputFilter DEFLATE
867 BrowserMatch ^Mozilla/4 gzip-only-text/html
868 BrowserMatch ^Mozilla/4\.0[678] no-gzip
869 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
870 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
871 <IfModule mod_headers.c>
872 Header append Vary User-Agent env=!dont-vary
877 <Location /api/basicauth>
878 SetHandler perl-script
879 PerlHandler OpenILS::WWW::RemoteAuth
882 # access restricted to localhost by default; since this module provides no
883 # client authentiation, restricting access by IP or other means is stongly
887 # remoteauth profile name
888 PerlSetVar OILSRemoteAuthProfile "Basic"
889 # Perl module for processing requests
890 PerlSetVar OILSRemoteAuthHandler "OpenILS::WWW::RemoteAuth::Basic"
892 # staff username/password for config lookup and patron retrieval
893 PerlSetVar OILSRemoteAuthClientUsername "admin"
894 PerlSetVar OILSRemoteAuthClientPassword "demo123"
897 <Location /api/ezproxy>
898 SetHandler perl-script
899 PerlHandler OpenILS::WWW::RemoteAuth
902 # access restricted to localhost by default; since this module provides no
903 # client authentiation, restricting access by IP or other means is stongly
907 # remoteauth profile name
908 PerlSetVar OILSRemoteAuthProfile "EZProxyCGI"
909 # Perl module for processing requests
910 PerlSetVar OILSRemoteAuthHandler "OpenILS::WWW::RemoteAuth::EZProxyCGI"
912 # staff username/password for config lookup and patron retrieval
913 PerlSetVar OILSRemoteAuthClientUsername "admin"
914 PerlSetVar OILSRemoteAuthClientPassword "demo123"
916 # Location of TT2 templates for EZProxy login form and error pages.
917 # Templates will be loaded from the following paths in reverse order.
918 PerlAddVar OILSRemoteAuthTemplatePath "@localstatedir@/templates/remoteauth/ezproxycgi"
919 #PerlAddVar OILSRemoteAuthTemplatePath "@localstatedir@/templates_localskin/remoteauth/ezproxycgi"
921 # Locale (defaults to en_us)
922 #PerlAddVar OILSRemoteAuthLocale "en_us"
924 # Base URI of your EZProxy server; be sure there is no trailing slash
925 PerlSetVar OILSRemoteAuthEZProxyBaseURI "http://example.com/ezproxy"
927 # shared secret used to generate EZProxy authentication ticket
928 # This should be the same as the value in the MD5 line of your EZProxy users.txt configuration
929 # This default value is not suitable for production!
930 PerlSetVar OILSRemoteAuthEZProxySecret "secret"
933 <Location /api/patronapi>
934 SetHandler perl-script
935 PerlHandler OpenILS::WWW::RemoteAuth
938 # access restricted to localhost by default; since this module provides no
939 # client authentication and can be configured to return detailed personal
940 # information, restricting access by IP or other means is stongly
944 # remoteauth profile name
945 PerlSetVar OILSRemoteAuthProfile "PatronAPI"
946 # Perl module for processing requests
947 PerlSetVar OILSRemoteAuthHandler "OpenILS::WWW::RemoteAuth::PatronAPI"
949 # staff username/password for config lookup and patron retrieval
950 PerlSetVar OILSRemoteAuthClientUsername "admin"
951 PerlSetVar OILSRemoteAuthClientPassword "demo123"
953 # Location of TT2 templates for PatronAPI responses.
954 # Templates will be loaded from the following paths in reverse order.
955 PerlAddVar OILSRemoteAuthTemplatePath "@localstatedir@/templates/remoteauth/patronapi"
956 #PerlAddVar OILSRemoteAuthTemplatePath "@localstatedir@/templates_localskin/remoteauth/patronapi"
958 # Locale (defaults to en_us)
959 #PerlAddVar OILSRemoteAuthLocale "en_us"
961 # set to "true" to allow retrieval of detailed patron information
962 # without patron authorization
963 PerlSetVar OILSRemoteAuthPatronAPIAllowDump "false"
965 # identifier type for patron information requests (/dump)
966 # permitted values: "barcode" (default), "username"
967 #PerlSetVar OILSRemoteAuthPatronAPIIDType "barcode"
970 # Uncomment the following to force SSL for everything. Note that this defeats caching
971 # and you will suffer a performance hit.
972 #RewriteCond %{HTTPS} off
973 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
975 # ------------------------------------------------------------------------
976 # /eg2/ client setup and locale configuration.
978 # If a valid locale cookie is present that does not match the current
979 # path, redirect to the requested locale path.
980 # Otherwise, if no locale is active, redirect to the default locale.
983 #RewriteCond %{REQUEST_URI} ^/eg2/
984 #RewriteCond %{REQUEST_URI} !^/eg2/fr-CA/
985 #RewriteCond %{HTTP_COOKIE} eg_locale=fr_ca
986 #RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/fr-CA/$1 [NE,R=307,L]
989 # No alternate supported cookie provided.
990 RewriteCond %{REQUEST_URI} ^/eg2/
991 RewriteCond %{REQUEST_URI} !^/eg2/([a-z]{2}-[A-Z]{2})/
992 RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [NE,R=307,L]
995 # This is the only required configuration when only using the default locale.
996 <Directory "@localstatedir@/web/eg2/en-US">
997 FallbackResource /eg2/en-US/index.html
999 <IfModule mod_headers.c>
1000 Header set Cache-Control "no-cache, no-store, must-revalidate"
1001 Header set Pragma "no-cache"
1002 Header set Expires 0
1008 #<Directory "@localstatedir@/web/eg2/fr-CA">
1009 # FallbackResource /eg2/fr-CA/index.html
1010 # <Files "index.html">
1011 # <IfModule mod_headers.c>
1012 # Header set Cache-Control "no-cache, no-store, must-revalidate"
1013 # Header set Pragma "no-cache"
1014 # Header set Expires 0