1 # ----------------------------------------------------------------------------------
2 # This is the global Evergreen virtual host config. Anything you want published
3 # through all virtual hosts (port 80, port 443, etc.) should live in here.
4 # ----------------------------------------------------------------------------------
6 # ----------------------------------------------------------------------------------
7 # Point / to the opac - if you have a custom skin or locale, point at it here
8 # ----------------------------------------------------------------------------------
9 RedirectMatch 301 ^/$ /eg/opac/home
11 # ----------------------------------------------------------------------------------
12 # Point / to the IP address redirector
13 # ----------------------------------------------------------------------------------
15 # SetHandler perl-script
16 # PerlHandler OpenILS::WWW::Redirect
19 # #PerlSetVar OILSRedirectSkin "default"
20 # # OILSRedirectDepth defaults to the depth of the branch that the OPAC was directed to
21 # #PerlSetVar OILSRedirectDepth "0"
22 # #PerlSetVar OILSRedirectLocale "en-US"
23 # # Use the template-toolkit opac
24 # #PerlSetVar OILSRedirectTpac "true"
29 # ----------------------------------------------------------------------------------
30 # Assign a default locale to the accessible OPAC
31 # ----------------------------------------------------------------------------------
32 RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpac/start.html
33 RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html
35 # ----------------------------------------------------------------------------------
36 # Configure the gateway
37 # ----------------------------------------------------------------------------------
38 OSRFGatewayConfig @sysconfdir@/opensrf_core.xml
39 # Translator memcache server. Default is localhost
40 # OSRFTranslatorCacheServer 127.0.0.1:11211
43 # ----------------------------------------------------------------------------------
44 # Added content plugin
45 # ----------------------------------------------------------------------------------
46 <Location /opac/extras/ac/>
47 SetHandler perl-script
48 PerlHandler OpenILS::WWW::AddedContent
54 # Autosuggest for searches
55 <Location /opac/extras/autosuggest>
56 SetHandler perl-script
57 PerlHandler OpenILS::WWW::AutoSuggest
63 <Location /opac/extras/flattener>
64 SetHandler perl-script
65 PerlHandler OpenILS::WWW::FlatFielder
70 # ----------------------------------------------------------------------------------
71 # Replace broken cover images with a transparent GIF by default
72 # ----------------------------------------------------------------------------------
74 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
75 /opac/images/blank.png [P,L]
77 <Location /opac/extras/ac/jacket>
78 ErrorDocument 404 /opac/images/blank.png
81 # ----------------------------------------------------------------------------------
82 # Add the row ID (RID) and date so we can make unAPI happy
83 # ----------------------------------------------------------------------------------
84 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
85 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
87 # ----------------------------------------------------------------------------------
88 # Pull the locale from the URL
89 # ----------------------------------------------------------------------------------
90 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
91 RewriteRule . - [E=locale:%1]
93 # ----------------------------------------------------------------------------------
94 # Rewrite JSPac->TPac with redirects
95 # ----------------------------------------------------------------------------------
97 # First things first, extract useful data
98 # And we are going to start with a "this is the JSPac" check on each of these:
99 # RewriteCond %{REQUEST_URI} ^/?opac/
101 # Basic (overall) search type, if present
102 # I am cheating and grabbing RT or TP because I dunno the difference between them.
103 RewriteCond %{REQUEST_URI} ^/opac/
104 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
105 RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
107 # Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
108 RewriteCond %{REQUEST_URI} ^/opac/
109 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
110 RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
112 # Search Location, if present
113 RewriteCond %{REQUEST_URI} ^/opac/
114 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
115 RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
118 RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml /eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
121 # /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
122 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
123 RewriteRule /opac/.*/rdetail.xml /eg/opac/record/%2?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
126 # /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
127 RewriteRule /opac/extras/feed/bookbag/html-full/(\d*) /eg/opac/results?bookbag=$1;%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
129 # Search Results Pages
130 RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
132 # Basic Search (STILL not doing advanced)
133 # Fallback! But only for things that end in xml, htm, or html
134 # Images, CSS, etc can stick around.
135 RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
137 # ----------------------------------------------------------------------------------
138 # For sanity reasons, default indexes to Off
139 # ----------------------------------------------------------------------------------
142 # ----------------------------------------------------------------------------------
144 # ----------------------------------------------------------------------------------
145 <LocationMatch /opac/>
146 SSILegacyExprParser on
147 AddType application/xhtml+xml .xml
149 # - configure mod_xmlent
151 XMLEntEscapeScript "no"
152 XMLEntStripComments "yes"
153 XMLEntContentType "text/html; charset=utf-8"
154 # forces quirks mode which we want for now
155 XMLEntStripDoctype "yes"
157 # - set up the include handlers
159 AddOutputFilter INCLUDES .xsl
160 AddOutputFilter INCLUDES;XMLENT .xml
162 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
164 # This gives you the option to configure a different host to serve OPAC images from
165 # Specify the hostname (without protocol) and path to the images. Protocol will
166 # be determined at runtime
167 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
169 # In addition to loading images from a static host, you can also load CSS and/or
170 # Javascript from a static host or hosts. Protocol will be determined at runtime
171 # and/or by configuration options immediately following.
172 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
173 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
175 # If you are not able to serve static content via https and
176 # wish to force http:// (and are comfortable with mixed-content
177 # warnings in client browsers), set this:
178 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
180 # If you would prefer to fall back to your non-static servers for
181 # https pages, avoiding mixed-content warnings in client browsers
182 # and are willing to accept some increased server load, set this:
183 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
185 # Specify a ChiliFresh account to integrate their services with the OPAC
186 #SetEnv OILS_CHILIFRESH_ACCOUNT
187 #SetEnv OILS_CHILIFRESH_PROFILE
188 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
189 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
191 # Specify the initial script URL for Novelist (containing account credentials, etc.)
192 #SetEnv OILS_NOVELIST_URL
195 # Uncomment to force SSL any time a patron is logged in. This protects
196 # authentication tokens. Left commented out for backwards compat for now.
197 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
199 # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
200 #SetEnv OILS_OPAC_COMBINED_JS 1
205 # ----------------------------------------------------------------------------------
206 # Some mod_deflate fun
207 # ----------------------------------------------------------------------------------
208 <IfModule mod_deflate.c>
209 SetOutputFilter DEFLATE
211 BrowserMatch ^Mozilla/4 gzip-only-text/html
212 BrowserMatch ^Mozilla/4\.0[678] no-gzip
213 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
215 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
217 <IfModule mod_headers.c>
218 Header append Vary User-Agent env=!dont-vary
225 # ----------------------------------------------------------------------------------
226 # Some mod_deflate fun
227 # ----------------------------------------------------------------------------------
228 <IfModule mod_deflate.c>
229 SetOutputFilter DEFLATE
231 BrowserMatch ^Mozilla/4 gzip-only-text/html
232 BrowserMatch ^Mozilla/4\.0[678] no-gzip
233 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
235 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
237 <IfModule mod_headers.c>
238 Header append Vary User-Agent env=!dont-vary
244 # ----------------------------------------------------------------------------------
245 # Force SSL on the OPAC's "My Account" page
246 # ----------------------------------------------------------------------------------
247 <LocationMatch .*/myopac.xml>
251 <LocationMatch /opac/extras/>
252 SSILegacyExprParser on
253 # Force to en-US for now to satisfy bbags.xml
256 AddOutputFilter INCLUDES .xml
257 AddType application/xhtml+xml .xml
260 RewriteCond %{QUERY_STRING} locale=([^&]*)
261 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
262 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
263 AddOutputFilter INCLUDES;XMLENT .html
266 # ----------------------------------------------------------------------------------
267 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
268 # ----------------------------------------------------------------------------------
269 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
270 # Default to en-US if we haven't matched a locale of the form xx-YY
271 RewriteRule .? - [S=4]
272 RewriteRule ^/xul/ - [E=locale:en-US]
273 RewriteRule ^/reports/ - [E=locale:en-US]
274 RewriteRule .? - [E=locale:en-US]
275 RewriteRule .? - [S=3]
276 # Otherwise, set our real locale
277 RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
278 RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
279 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
281 <LocationMatch /xul/.*\.x?html$>
282 SSILegacyExprParser on
284 XMLEntEscapeScript "no"
285 XMLEntStripComments "yes"
287 XMLEntStripDoctype "yes"
288 XMLEntContentType "text/html; charset=utf-8"
289 AddOutputFilter INCLUDES;XMLENT .xhtml
290 AddOutputFilter INCLUDES;XMLENT .html
296 <LocationMatch /xul/.*\.xul$>
297 SSILegacyExprParser on
299 XMLEntContentType "application/vnd.mozilla.xul+xml"
300 AddOutputFilter INCLUDES;XMLENT .xul
305 # ----------------------------------------------------------------------------------
307 # ----------------------------------------------------------------------------------
308 <Location /opac/extras/oisbn>
309 SetHandler perl-script
310 PerlHandler OpenILS::WWW::SuperCat::oisbn
315 <Location /opac/extras/supercat>
316 SetHandler perl-script
317 PerlHandler OpenILS::WWW::SuperCat::supercat
322 <Location /opac/extras/unapi>
323 SetHandler perl-script
324 PerlHandler OpenILS::WWW::SuperCat::unapi
329 <Location /opac/extras/feed/bookbag>
330 SetHandler perl-script
331 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
336 <Location /opac/extras/opensearch>
337 SetHandler perl-script
338 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
343 <Location /opac/extras/sru>
344 SetHandler perl-script
345 PerlHandler OpenILS::WWW::SuperCat::sru_search
350 <Location /opac/extras/sru_auth>
351 SetHandler perl-script
352 PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
357 <Location /opac/extras/feed/freshmeat>
358 SetHandler perl-script
359 PerlHandler OpenILS::WWW::SuperCat::changes_feed
364 <Location /opac/extras/browse>
365 SetHandler perl-script
366 PerlHandler OpenILS::WWW::SuperCat::string_browse
371 <Location /opac/extras/startwith>
372 SetHandler perl-script
373 PerlHandler OpenILS::WWW::SuperCat::string_startwith
379 # ----------------------------------------------------------------------------------
380 # Module for displaying OpenSRF API documentation
381 # ----------------------------------------------------------------------------------
382 <Location /opac/extras/docgen.xsl>
383 AddOutputFilter INCLUDES .xsl
386 # ----------------------------------------------------------------------------------
387 # Module for processing staff-client offline scripts lives here
388 # ----------------------------------------------------------------------------------
389 <Directory "@localstatedir@/cgi-bin/offline">
390 AddHandler cgi-script .pl
397 # ----------------------------------------------------------------------------------
398 # XXX Note, it's important to explicitly set the JSON encoding style
399 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
401 # ----------------------------------------------------------------------------------
402 # OpenSRF JSON legacy gateway
403 # ----------------------------------------------------------------------------------
405 SetHandler osrf_json_gateway_module
406 OSRFGatewayLegacyJSON "true"
409 # ----------------------------------------------------------------------------------
410 # New-style OpenSRF JSON gateway
411 # ----------------------------------------------------------------------------------
412 <Location /osrf-gateway-v1>
413 SetHandler osrf_json_gateway_module
414 OSRFGatewayLegacyJSON "false"
418 # ----------------------------------------------------------------------------------
419 # OpenSRF-over-HTTP translator
420 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
421 # ----------------------------------------------------------------------------------
422 <Location /osrf-http-translator>
423 SetHandler osrf_http_translator_module
427 # ----------------------------------------------------------------------------------
428 # The exporter lives here
429 # ----------------------------------------------------------------------------------
431 SetHandler perl-script
433 AuthName "Exporter Login"
434 PerlOptions +GlobalRequest
435 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
436 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
438 PerlHandler OpenILS::WWW::Exporter
444 <Location /opac/extras/merge_template>
445 SetHandler perl-script
447 AuthName "Batch Update Login"
448 PerlOptions +GlobalRequest
449 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
450 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
452 PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
458 <Location /opac/extras/circ>
460 AuthName "Circ Extras Login"
461 PerlOptions +GlobalRequest
462 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
463 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
470 <Location /collections>
471 SetHandler perl-script
473 AuthName "Collections Login"
474 PerlOptions +GlobalRequest
475 PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
476 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
483 # ----------------------------------------------------------------------------------
484 # Protect Standalone/Offline mode files from public view
485 # ----------------------------------------------------------------------------------
486 <Location /standalone/>
488 AuthName "Standalone Mode Login"
489 PerlOptions +GlobalRequest
490 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
491 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
498 # ----------------------------------------------------------------------------------
499 # Reporting output lives here
500 # ----------------------------------------------------------------------------------
501 <Location /reporter/>
503 AuthName "Report Login"
504 PerlOptions +GlobalRequest
505 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
506 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
513 # ----------------------------------------------------------------------------------
514 # Selfcheck interface
515 # ----------------------------------------------------------------------------------
516 <LocationMatch .*/selfcheck.xml>
518 AuthName "Self-check Login"
519 PerlOptions +GlobalRequest
520 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
521 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
529 # ----------------------------------------------------------------------------------
531 # ----------------------------------------------------------------------------------
532 <LocationMatch /reports>
533 SSILegacyExprParser on
535 AddOutputFilter INCLUDES;XMLENT .xhtml
538 # capture locale CGI param for /reports/fm_IDL.xml
539 RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
540 RewriteCond %{QUERY_STRING} locale=([^&;]*)
541 RewriteRule . - [E=locale:%1]
543 <LocationMatch /reports/fm_IDL.xml>
544 IDLChunkStripPI "yes"
545 IDLChunkEscapeScript "no"
546 IDLChunkStripComments "yes"
547 IDLChunkStripDoctype "yes"
548 IDLChunkContentType "application/xml; charset=utf-8"
549 AddOutputFilter INCLUDES;IDLCHUNK .xml
552 # ----------------------------------------------------------------------------------
554 # ----------------------------------------------------------------------------------
556 SetHandler perl-script
557 PerlHandler OpenILS::WWW::EDI
563 # ----------------------------------------------------------------------------------
565 # ----------------------------------------------------------------------------------
567 SetHandler perl-script
568 PerlHandler OpenILS::WWW::XMLRPCGateway
572 <IfModule mod_headers.c>
573 Header onsuccess set Cache-Control no-cache
577 # ----------------------------------------------------------------------------------
578 # Conify - next-generation Evergreen administration interface
579 # ----------------------------------------------------------------------------------
580 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
582 SSILegacyExprParser on
585 XMLEntEscapeScript "no"
586 XMLEntStripComments "no"
587 XMLEntContentType "text/html; charset=utf-8"
588 AddOutputFilter INCLUDES;XMLENT .html
591 AuthName "Dojo Admin Login"
592 PerlOptions +GlobalRequest
593 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
594 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
601 # ----------------------------------------------------------------------------------
602 # The PhoneList lives here
603 # ----------------------------------------------------------------------------------
604 <Location /phonelist>
605 SetHandler perl-script
607 AuthName "PhoneList Login"
609 PerlOptions +GlobalRequest
610 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
611 PerlHandler OpenILS::WWW::PhoneList
612 PerlAuthenHandler OpenILS::WWW::Proxy::Authen
616 <IfModule mod_headers.c>
617 Header onsuccess set Cache-Control no-cache
620 <Location /vandelay-upload>
621 SetHandler perl-script
622 PerlHandler OpenILS::WWW::Vandelay::spool_marc
627 # OpenURL 0.1 searching based on OpenSearch
628 RewriteMap openurl prg:@bindir@/openurl_map.pl
629 RewriteCond %{QUERY_STRING} (^.*$)
630 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
634 # General Evergreen web template processor
636 SetHandler perl-script
637 PerlHandler OpenILS::WWW::EGWeb
642 PerlSetVar OILSWebBasePath "/eg"
643 PerlSetVar OILSWebWebDir "@localstatedir@/web"
644 PerlSetVar OILSWebDefaultTemplateExtension "tt2"
646 # Enable Template-Toolkit error debugging messages (apache error log)
647 PerlSetVar OILSWebDebugTemplate "true"
649 # -------------------------------------------------------
650 # Media Prefix. In the 3rd example, the protocol (http) is enforced
651 #PerlSetVar OILSWebMediaPrefix "/media"
652 #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
653 #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
655 # Locale messages files:
657 # These appear in pairs; the first represents the user agent
658 # Accept-Language header locale, and the second represents
659 # the fully-qualified path for the corresponding PO file that
660 # contains the messages.
662 # If you enable two or more locales, then users will be able to
663 # select their preferred locale from a locale picker in the TPAC.
665 #PerlAddVar OILSWebLocale "en"
666 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/messages.en.po"
667 #PerlAddVar OILSWebLocale "en_ca"
668 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/en-CA.po"
669 #PerlAddVar OILSWebLocale "fr_ca"
670 #PerlAddVar OILSWebLocale "@localstatedir@/data/locale/fr-CA.po"
672 # Set the default locale: defaults to en-US
673 #PerlAddVar OILSWebDefaultLocale "fr_ca"
675 # Templates will be loaded from the following paths in reverse order.
676 PerlAddVar OILSWebTemplatePath "@localstatedir@/templates"
677 #PerlAddVar OILSWebTemplatePath "@localstatedir@/templates_localskin"
679 #-------------------------------------------------
680 # Added Content Configuration
681 #-------------------------------------------------
683 #SetEnv OILS_CONTENT_CAFE_USER MYUSER
684 #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
687 #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
688 #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
691 #SetEnv OILS_CHILIFRESH_ACCOUNT
692 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
693 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
696 # SetEnv OILS_NOVELIST_URL http://imageserver.ebscohost.com/novelistselect/ns2init.js
697 # SetEnv OILS_NOVELIST_PROFILE <profile>
698 # SetEnv OILS_NOVELIST_PASSWORD <password>
700 #-------------------------------------------------
702 <IfModule mod_deflate.c>
703 SetOutputFilter DEFLATE
704 BrowserMatch ^Mozilla/4 gzip-only-text/html
705 BrowserMatch ^Mozilla/4\.0[678] no-gzip
706 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
707 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
708 <IfModule mod_headers.c>
709 Header append Cache-Control "public"
710 Header append Vary User-Agent env=!dont-vary
714 <LocationMatch ^/(images|css|js)/>
715 # should pick up the default expire time from eg.conf...
716 <IfModule mod_deflate.c>
717 SetOutputFilter DEFLATE
718 BrowserMatch ^Mozilla/4 gzip-only-text/html
719 BrowserMatch ^Mozilla/4\.0[678] no-gzip
720 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
721 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
722 <IfModule mod_headers.c>
723 Header append Cache-Control "public"
724 Header append Vary User-Agent env=!dont-vary
729 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
730 # Expire the HTML quickly since we're loading dynamic data for each page
732 ExpiresByType text/html "access plus 5 seconds"
735 PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
736 PerlSetVar KPacConfigFile "@sysconfdir@/kpac.xml.example"
738 ExpiresByType text/html "access plus 5 seconds"
741 # Note: the template processor will decline handling anything it does not
742 # have an explicit configuration for, which means it will fall back to
743 # Apache to serve the file. However, in the interest of speed, go ahead
744 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
745 # Add more exemptions as needed.
746 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
750 # ----------------------------------------------------------------------------------
751 # Some mod_deflate logging setup
752 # ----------------------------------------------------------------------------------
753 <IfModule mod_deflate.c>
754 DeflateFilterNote Input instream
755 DeflateFilterNote Output outstream
756 DeflateFilterNote Ratio ratio
758 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
759 CustomLog /var/log/apache2/deflate_log deflate
761 # There are problems with XMLENT and mod_deflate - so lets disable it
762 # This is where we don't have a pre-existing LocationMatch directive earlier
763 <LocationMatch /opac/.*\.xml$>
766 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
769 <LocationMatch /reports/.*\.xhtml$>
772 <LocationMatch /conify/.*\.html$>
780 SetHandler perl-script
781 PerlHandler OpenILS::WWW::IDL2js
786 <IfModule mod_headers.c>
787 Header append Cache-Control "public"
790 <IfModule mod_deflate.c>
791 SetOutputFilter DEFLATE
792 BrowserMatch ^Mozilla/4 gzip-only-text/html
793 BrowserMatch ^Mozilla/4\.0[678] no-gzip
794 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
795 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
796 <IfModule mod_headers.c>
797 Header append Vary User-Agent env=!dont-vary
802 # Uncomment the following to force SSL for everything. Note that this defeats caching
803 # and you will suffer a performance hit.
804 #RewriteCond %{HTTPS} off
805 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]