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 RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml %{ENV: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]
138 # -----------------------------------------------------------------------------$
139 # Force HTTPS for /eg/circ/selfcheck
140 # -----------------------------------------------------------------------------$
141 RewriteCond %{HTTPS} off
142 RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
144 # ----------------------------------------------------------------------------------
145 # For sanity reasons, default indexes to Off
146 # ----------------------------------------------------------------------------------
149 # ----------------------------------------------------------------------------------
151 # ----------------------------------------------------------------------------------
152 <LocationMatch /opac/>
153 AddType application/xhtml+xml .xml
155 # - configure mod_xmlent
157 XMLEntEscapeScript "no"
158 XMLEntStripComments "yes"
159 XMLEntContentType "text/html; charset=utf-8"
160 # forces quirks mode which we want for now
161 XMLEntStripDoctype "yes"
163 # - set up the include handlers
165 AddOutputFilter INCLUDES .xsl
166 AddOutputFilter INCLUDES;XMLENT .xml
168 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
170 # This gives you the option to configure a different host to serve OPAC images from
171 # Specify the hostname (without protocol) and path to the images. Protocol will
172 # be determined at runtime
173 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
175 # In addition to loading images from a static host, you can also load CSS and/or
176 # Javascript from a static host or hosts. Protocol will be determined at runtime
177 # and/or by configuration options immediately following.
178 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
179 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
181 # If you are not able to serve static content via https and
182 # wish to force http:// (and are comfortable with mixed-content
183 # warnings in client browsers), set this:
184 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
186 # If you would prefer to fall back to your non-static servers for
187 # https pages, avoiding mixed-content warnings in client browsers
188 # and are willing to accept some increased server load, set this:
189 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
191 # Specify a ChiliFresh account to integrate their services with the OPAC
192 #SetEnv OILS_CHILIFRESH_ACCOUNT
193 #SetEnv OILS_CHILIFRESH_PROFILE
194 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
195 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
197 # Specify the initial script URL for Novelist (containing account credentials, etc.)
198 #SetEnv OILS_NOVELIST_URL
199 #SetEnv OILS_NOVELIST_PROFILE
200 #SetEnv OILS_NOVELIST_PASSWORD
202 # Uncomment to force SSL any time a patron is logged in. This protects
203 # authentication tokens. Left commented out for backwards compat for now.
204 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
206 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
207 #SetEnv OILS_OPAC_COMBINED_JS 1
212 # ----------------------------------------------------------------------------------
213 # Some mod_deflate fun
214 # ----------------------------------------------------------------------------------
215 <IfModule mod_deflate.c>
216 SetOutputFilter DEFLATE
218 BrowserMatch ^Mozilla/4 gzip-only-text/html
219 BrowserMatch ^Mozilla/4\.0[678] no-gzip
220 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
222 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
224 <IfModule mod_headers.c>
225 Header append Vary User-Agent env=!dont-vary
232 # ----------------------------------------------------------------------------------
233 # Some mod_deflate fun
234 # ----------------------------------------------------------------------------------
235 <IfModule mod_deflate.c>
236 SetOutputFilter DEFLATE
238 BrowserMatch ^Mozilla/4 gzip-only-text/html
239 BrowserMatch ^Mozilla/4\.0[678] no-gzip
240 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
242 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
244 <IfModule mod_headers.c>
245 Header append Vary User-Agent env=!dont-vary
251 # ----------------------------------------------------------------------------------
252 # Force SSL on the OPAC's "My Account" page
253 # ----------------------------------------------------------------------------------
254 <LocationMatch .*/myopac.xml>
258 RewriteCond %{QUERY_STRING} locale=([^&]*)
259 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ %{ENV:REQUEST_SCHEME}://%{HTTP_HOST}/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
479 # ----------------------------------------------------------------------------------
480 # Protect Standalone/Offline mode files from public view
481 # ----------------------------------------------------------------------------------
482 <Location /standalone/>
484 AuthName "Standalone Mode Login"
485 PerlOptions +GlobalRequest
486 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
487 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
494 # ----------------------------------------------------------------------------------
495 # Reporting output lives here
496 # ----------------------------------------------------------------------------------
497 <Location /reporter/>
499 AuthName "Report Login"
500 PerlOptions +GlobalRequest
501 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
502 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
509 # ----------------------------------------------------------------------------------
511 # ----------------------------------------------------------------------------------
512 <LocationMatch /reports.*\.x?html>
514 XMLEntContentType "text/html; charset=utf-8"
515 AddOutputFilter INCLUDES;XMLENT .xhtml
516 AddOutputFilter INCLUDES;XMLENT .html
519 <LocationMatch /reports>
521 AddOutputFilter INCLUDES;XMLENT .xhtml
524 # capture locale CGI param for /reports/fm_IDL.xml
525 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
526 RewriteCond %{QUERY_STRING} locale=([^&;]*)
527 RewriteRule . - [E=locale:%1]
529 <LocationMatch /reports/fm_IDL.xml>
530 IDLChunkStripPI "yes"
531 IDLChunkEscapeScript "no"
532 IDLChunkStripComments "yes"
533 IDLChunkStripDoctype "yes"
534 IDLChunkContentType "application/xml; charset=utf-8"
535 AddOutputFilter INCLUDES;IDLCHUNK .xml
539 # ----------------------------------------------------------------------------------
541 # ----------------------------------------------------------------------------------
543 SetHandler perl-script
544 PerlHandler OpenILS::WWW::EDI
550 # ----------------------------------------------------------------------------------
552 # ----------------------------------------------------------------------------------
554 SetHandler perl-script
555 PerlHandler OpenILS::WWW::XMLRPCGateway
559 <IfModule mod_headers.c>
560 Header onsuccess set Cache-Control no-cache
564 # ----------------------------------------------------------------------------------
565 # Conify - next-generation Evergreen administration interface
566 # ----------------------------------------------------------------------------------
567 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
571 XMLEntEscapeScript "no"
572 XMLEntStripComments "no"
573 XMLEntContentType "text/html; charset=utf-8"
574 AddOutputFilter INCLUDES;XMLENT .html
577 AuthName "Dojo Admin Login"
578 PerlOptions +GlobalRequest
579 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
580 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
587 # ----------------------------------------------------------------------------------
588 # The PhoneList lives here
589 # ----------------------------------------------------------------------------------
590 <Location /phonelist>
591 SetHandler perl-script
593 AuthName "PhoneList Login"
595 PerlOptions +GlobalRequest
596 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
597 PerlHandler OpenILS::WWW::PhoneList
598 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
602 <IfModule mod_headers.c>
603 Header onsuccess set Cache-Control no-cache
606 <Location /vandelay-upload>
607 SetHandler perl-script
608 PerlHandler OpenILS::WWW::Vandelay::spool_marc
613 # OpenURL 0.1 searching based on OpenSearch
614 RewriteMap openurl prg:@bindir@/openurl_map.pl
615 RewriteCond %{QUERY_STRING} (^.*$)
616 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
620 # General Evergreen web template processor
622 SetHandler perl-script
623 PerlHandler OpenILS::WWW::EGWeb
628 PerlSetVar OILSWebBasePath "/eg"
629 PerlSetVar OILSWebWebDir "@localstatedir@/web"
630 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
632 # Port Apache listens on for HTTP traffic. Used for HTTP requests
633 # routed from Perl handlers back to the same Apache instance, like
634 # added content requests. Use this when running Apache with a
635 # non-standard port, typical with a proxy setup. Defaults to "80".
636 # PerlSetVar OILSWebInternalHTTPPort "7080"
638 # Enable Template-Toolkit error debugging messages (apache error log)
639 PerlSetVar OILSWebDebugTemplate "false"
640 # local cache of compiled Template Toolkit templates
641 PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
642 # template TTL - how long, in seconds, that Template Toolkit
643 # waits to check for updated template files
644 #PerlSetVar OILSWebTemplateStatTTL 60
646 # -------------------------------------------------------
647 # Media Prefix. In the 3rd example, the protocol (http) is enforced
648 #PerlSetVar OILSWebMediaPrefix "/media"
649 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
650 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
652 # Locale messages files:
654 # These appear in pairs; the first represents the user agent
655 # Accept-Language header locale, and the second represents
656 # the fully-qualified path for the corresponding PO file that
657 # contains the messages.
659 # If you enable two or more locales, then users will be able to
660 # select their preferred locale from a locale picker in the TPAC.
662 #PerlAddVar OILSWebLocale "en"
663 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/messages.en.po"
664 #PerlAddVar OILSWebLocale "en_ca"
665 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/en-CA.po"
666 #PerlAddVar OILSWebLocale "fr_ca"
667 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/opac/fr-CA.po"
669 # Set the default locale: defaults to en-US
670 #PerlAddVar OILSWebDefaultLocale "fr_ca"
672 # Templates will be loaded from the following paths in reverse order.
673 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
674 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
676 #-------------------------------------------------
677 # Added Content Configuration
678 #-------------------------------------------------
680 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
681 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
684 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
685 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
688 #SetEnv OILS_CHILIFRESH_ACCOUNT
689 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
690 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
691 #-------------------------------------------------
693 <IfModule mod_deflate.c>
694 SetOutputFilter DEFLATE
695 BrowserMatch ^Mozilla/4 gzip-only-text/html
696 BrowserMatch ^Mozilla/4\.0[678] no-gzip
697 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
698 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
699 <IfModule mod_headers.c>
700 Header append Cache-Control "public"
701 Header append Vary User-Agent env=!dont-vary
705 <LocationMatch ^/(images|css|js)/>
706 # should pick up the default expire time from eg.conf...
707 <IfModule mod_deflate.c>
708 SetOutputFilter DEFLATE
709 BrowserMatch ^Mozilla/4 gzip-only-text/html
710 BrowserMatch ^Mozilla/4\.0[678] no-gzip
711 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
712 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
713 <IfModule mod_headers.c>
714 Header append Cache-Control "public"
715 Header append Vary User-Agent env=!dont-vary
720 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
721 # Expire the HTML quickly since we're loading dynamic data for each page
723 ExpiresByType text/html "access plus 5 seconds"
726 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
727 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
729 ExpiresByType text/html "access plus 5 seconds"
732 # Note: the template processor will decline handling anything it does not
733 # have an explicit configuration for, which means it will fall back to
734 # Apache to serve the file. However, in the interest of speed, go ahead
735 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
736 # Add more exemptions as needed.
737 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
741 # ----------------------------------------------------------------------------------
742 # Some mod_deflate setup
743 # ----------------------------------------------------------------------------------
744 <IfModule mod_deflate.c>
745 ## optional logging for mod_deflate debugging
746 ##DeflateFilterNote Input instream
747 ##DeflateFilterNote Output outstream
748 ##DeflateFilterNote Ratio ratio
750 ##LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
751 ##CustomLog /var/log/apache2/deflate_log deflate
753 # There are problems with XMLENT and mod_deflate - so lets disable it
754 # This is where we don't have a pre-existing LocationMatch directive earlier
755 <LocationMatch /opac/.*\.xml$>
758 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
761 <LocationMatch /reports/.*\.xhtml$>
764 <LocationMatch /conify/.*\.html$>
772 SetHandler perl-script
773 PerlHandler OpenILS::WWW::IDL2js
778 <IfModule mod_headers.c>
779 Header append Cache-Control "public"
782 <IfModule mod_deflate.c>
783 SetOutputFilter DEFLATE
784 BrowserMatch ^Mozilla/4 gzip-only-text/html
785 BrowserMatch ^Mozilla/4\.0[678] no-gzip
786 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
787 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
788 <IfModule mod_headers.c>
789 Header append Vary User-Agent env=!dont-vary
794 <LocationMatch /eg/staff/>
797 PerlSetVar OILSWebStopAtIndex "true"
799 RewriteCond %{HTTPS} off
800 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
802 # sample staff-specific translation files
803 #PerlAddVar OILSWebLocale "en_ca"
804 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/en-CA.po"
805 #PerlAddVar OILSWebLocale "fr_ca"
806 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/staff/fr-CA.po"
810 <IfModule mod_headers.c>
811 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 # Uncomment the following to force SSL for everything. Note that this defeats caching
826 # and you will suffer a performance hit.
827 #RewriteCond %{HTTPS} off
828 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
831 # ------------------------------------------------------------------------
832 # /eg2/ client setup and locale configuration.
834 # If a valid locale cookie is present that does not match the current
835 # path, redirect to the requested locale path.
836 # Otherwise, if no locale is active, redirect to the default locale.
839 #RewriteCond %{REQUEST_URI} ^/eg2/
840 #RewriteCond %{REQUEST_URI} !^/eg2/fr-CA/
841 #RewriteCond %{HTTP_COOKIE} eg_locale=fr_ca
842 #RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/fr-CA/$1 [R=307,L]
845 # No alternate supported cookie provided.
846 RewriteCond %{REQUEST_URI} ^/eg2/
847 RewriteCond %{REQUEST_URI} !^/eg2/([a-z]{2}-[A-Z]{2})/
848 RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [R=307,L]
851 # This is the only required configuration when only using the default locale.
852 <Directory "/openils/var/web/eg2/en-US">
853 FallbackResource /eg2/en-US/index.html
857 #<Directory "/openils/var/web/eg2/fr-CA">
858 # FallbackResource /eg2/fr-CA/index.html