]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/apache_24/eg_vhost.conf
2257bf8a158d402ada565858a14693822964f400
[working/Evergreen.git] / Open-ILS / examples / apache_24 / eg_vhost.conf
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 # ----------------------------------------------------------------------------------
5
6 # ----------------------------------------------------------------------------------
7 # Point / to the opac - if you have a custom skin or locale, point at it here
8 # ----------------------------------------------------------------------------------
9 RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
10
11 # ----------------------------------------------------------------------------------
12 # Point / to the IP address redirector
13 # ----------------------------------------------------------------------------------
14 #<LocationMatch ^/$>
15 #    SetHandler perl-script
16 #    PerlHandler OpenILS::WWW::Redirect
17 #    Options +ExecCGI
18 #    PerlSendHeader On
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"
25 #    allow from all
26 #</LocationMatch>
27
28
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
34
35 # ----------------------------------------------------------------------------------
36 # Configure the gateway
37 # ----------------------------------------------------------------------------------
38 OSRFGatewayConfig /openils/conf/opensrf_core.xml
39 # Translator memcache server.  Default is localhost
40 # OSRFTranslatorCacheServer 127.0.0.1:11211
41
42
43 # ----------------------------------------------------------------------------------
44 # Added content plugin
45 # ----------------------------------------------------------------------------------
46 <Location /opac/extras/ac/>
47     SetHandler perl-script
48     PerlHandler OpenILS::WWW::AddedContent
49     Options +ExecCGI
50     PerlSendHeader On
51     Require all granted 
52 </Location>
53
54 # Autosuggest for searches
55 <Location /opac/extras/autosuggest>
56     SetHandler perl-script
57     PerlHandler OpenILS::WWW::AutoSuggest
58     PerlSendHeader On
59     Require all granted 
60 </Location>
61
62 # Flattener service
63 <Location /opac/extras/flattener>
64     SetHandler perl-script
65     PerlHandler OpenILS::WWW::FlatFielder
66     PerlSendHeader On
67     Require all granted 
68 </Location>
69
70 # ----------------------------------------------------------------------------------
71 # Replace broken cover images with a transparent GIF by default
72 # ----------------------------------------------------------------------------------
73 RewriteEngine ON
74 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
75     /opac/images/blank.png [P,L]
76
77 # ----------------------------------------------------------------------------------
78 # Add the row ID (RID) and date so we can make unAPI happy
79 # ----------------------------------------------------------------------------------
80 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
81 RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
82
83 # ----------------------------------------------------------------------------------
84 # Pull the locale from the URL
85 # ----------------------------------------------------------------------------------
86 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
87 RewriteRule . - [E=locale:%1]
88
89 # ----------------------------------------------------------------------------------
90 # For sanity reasons, default indexes to Off
91 # ----------------------------------------------------------------------------------
92 Options -Indexes
93
94 # ----------------------------------------------------------------------------------
95 # Configure the OPAC
96 # ----------------------------------------------------------------------------------
97 <LocationMatch /opac/>
98     SSILegacyExprParser on
99     AddType application/xhtml+xml .xml
100    
101     # - configure mod_xmlent
102     XMLEntStripPI "yes"
103     XMLEntEscapeScript "no"
104     XMLEntStripComments "yes"
105     XMLEntContentType "text/html; charset=utf-8"
106     # forces quirks mode which we want for now
107     XMLEntStripDoctype "yes" 
108
109     # - set up the include handlers
110     Options +Includes
111     AddOutputFilter INCLUDES .xsl
112     AddOutputFilter INCLUDES;XMLENT .xml
113                     
114     SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
115     
116     # This gives you the option to configure a different host to serve OPAC images from
117     # Specify the hostname (without protocol) and path to the images.  Protocol will
118     # be determined at runtime
119     #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
120
121     # In addition to loading images from a static host, you can also load CSS and/or
122     # Javascript from a static host or hosts. Protocol will be determined at runtime
123     # and/or by configuration options immediately following.
124     #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
125     #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
126
127     # If you are not able to serve static content via https and 
128     # wish to force http:// (and are comfortable with mixed-content
129     # warnings in client browsers), set this:
130     #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
131
132     # If you would prefer to fall back to your non-static servers for 
133     # https pages, avoiding mixed-content warnings in client browsers
134     # and are willing to accept some increased server load, set this:
135     #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
136
137     # Specify a ChiliFresh account to integrate their services with the OPAC
138     #SetEnv OILS_CHILIFRESH_ACCOUNT
139     #SetEnv OILS_CHILIFRESH_PROFILE
140     #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
141     #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
142
143     # Specify the initial script URL for Novelist (containing account credentials, etc.)
144     #SetEnv OILS_NOVELIST_URL
145     #
146
147     # Uncomment to force SSL any time a patron is logged in.  This protects 
148     # authentication tokens.  Left commented out for backwards compat for now.
149     #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
150
151     # If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
152     #SetEnv OILS_OPAC_COMBINED_JS 1
153
154 </LocationMatch>
155
156 <Location /opac/>
157     # ----------------------------------------------------------------------------------
158     # Some mod_deflate fun
159     # ----------------------------------------------------------------------------------
160     <IfModule mod_deflate.c>
161         SetOutputFilter DEFLATE
162
163         BrowserMatch ^Mozilla/4 gzip-only-text/html
164         BrowserMatch ^Mozilla/4\.0[678] no-gzip
165         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
166
167         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
168
169         <IfModule mod_headers.c>
170             Header append Vary User-Agent env=!dont-vary
171         </IfModule>
172     </IfModule>
173
174 </Location>
175
176 <Location //opac/>
177     # ----------------------------------------------------------------------------------
178     # Some mod_deflate fun
179     # ----------------------------------------------------------------------------------
180     <IfModule mod_deflate.c>
181         SetOutputFilter DEFLATE
182
183         BrowserMatch ^Mozilla/4 gzip-only-text/html
184         BrowserMatch ^Mozilla/4\.0[678] no-gzip
185         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
186
187         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
188
189         <IfModule mod_headers.c>
190             Header append Vary User-Agent env=!dont-vary
191         </IfModule>
192     </IfModule>
193
194 </Location>
195
196 # ----------------------------------------------------------------------------------
197 # Force SSL on the OPAC's "My Account" page
198 # ----------------------------------------------------------------------------------
199 <LocationMatch .*/myopac.xml>
200     SSLRequireSSL
201 </LocationMatch>
202
203 <LocationMatch /opac/extras/>
204     SSILegacyExprParser on
205     # Force to en-US for now to satisfy bbags.xml
206     SetEnv locale en-US
207     Options +Includes
208     AddOutputFilter INCLUDES .xml
209     AddType application/xhtml+xml .xml
210 </LocationMatch>
211
212 RewriteCond %{QUERY_STRING} locale=([^&]*)
213 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
214 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
215     AddOutputFilter INCLUDES;XMLENT .html
216 </LocationMatch>
217
218 # ----------------------------------------------------------------------------------
219 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
220 # ----------------------------------------------------------------------------------
221 RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
222 # Default to en-US if we haven't matched a locale of the form xx-YY 
223 RewriteRule .? - [S=4]
224 RewriteRule ^/xul/      -       [E=locale:en-US]
225 RewriteRule ^/reports/  -       [E=locale:en-US]
226 RewriteRule .? - [E=locale:en-US]
227 RewriteRule .? - [S=3]
228 # Otherwise, set our real locale
229 RewriteRule ^/xul/      -       [E=locale:%{HTTP:Accept-Language}]
230 RewriteRule ^/reports/  -       [E=locale:%{HTTP:Accept-Language}]
231 RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
232
233 <LocationMatch /xul/.*\.x?html$>
234     SSILegacyExprParser on
235     Options +Includes
236     XMLEntEscapeScript "no"
237     XMLEntStripComments "yes"
238     XMLEntStripPI "yes"
239     XMLEntStripDoctype "yes"
240     XMLEntContentType "text/html; charset=utf-8"
241     AddOutputFilter INCLUDES;XMLENT .xhtml
242     AddOutputFilter INCLUDES;XMLENT .html
243     SetEnv no-gzip
244     Require all granted 
245 </LocationMatch>
246
247
248 <LocationMatch /xul/.*\.xul$>
249     SSILegacyExprParser on
250     Options +Includes
251     XMLEntContentType "application/vnd.mozilla.xul+xml"
252     AddOutputFilter INCLUDES;XMLENT .xul
253     SetEnv no-gzip
254     Require all granted 
255 </LocationMatch>
256
257 # ----------------------------------------------------------------------------------
258 # Self-serve password interface
259 # ----------------------------------------------------------------------------------
260 <Location /opac/password>
261     SetHandler perl-script
262     PerlHandler OpenILS::WWW::PasswordReset::password_reset
263     Options +ExecCGI
264     PerlSendHeader On
265     Require all granted 
266
267     # Force clients to use HTTPS
268     RewriteCond %{HTTPS} !=on [NC]
269     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
270 </Location>
271
272 # ----------------------------------------------------------------------------------
273 # Supercat feeds
274 # ----------------------------------------------------------------------------------
275 <Location /opac/extras/oisbn>
276     SetHandler perl-script
277     PerlHandler OpenILS::WWW::SuperCat::oisbn
278     Options +ExecCGI
279     PerlSendHeader On
280     Require all granted 
281 </Location>
282 <Location /opac/extras/supercat>
283     SetHandler perl-script
284     PerlHandler OpenILS::WWW::SuperCat::supercat
285     Options +ExecCGI
286     PerlSendHeader On
287     Require all granted 
288 </Location>
289 <Location /opac/extras/unapi>
290     SetHandler perl-script
291     PerlHandler OpenILS::WWW::SuperCat::unapi
292     Options +ExecCGI
293     PerlSendHeader On
294     Require all granted 
295 </Location>
296 <Location /opac/extras/feed/bookbag>
297     SetHandler perl-script
298     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
299     Options +ExecCGI
300     PerlSendHeader On
301     Require all granted 
302 </Location>
303 <Location /opac/extras/opensearch>
304     SetHandler perl-script
305     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
306     Options +ExecCGI
307     PerlSendHeader On
308     Require all granted 
309 </Location>
310 <Location /opac/extras/sru>
311     SetHandler perl-script
312     PerlHandler OpenILS::WWW::SuperCat::sru_search
313     Options +ExecCGI
314     PerlSendHeader On
315     Require all granted 
316 </Location>
317 <Location /opac/extras/sru_auth>
318     SetHandler perl-script
319     PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
320     Options +ExecCGI
321     PerlSendHeader On
322     Require all granted 
323 </Location>
324 <Location /opac/extras/feed/freshmeat>
325     SetHandler perl-script
326     PerlHandler OpenILS::WWW::SuperCat::changes_feed
327     Options +ExecCGI
328     PerlSendHeader On
329     Require all granted 
330 </Location>
331 <Location /opac/extras/browse>
332     SetHandler perl-script
333     PerlHandler OpenILS::WWW::SuperCat::string_browse
334     Options +ExecCGI
335     PerlSendHeader On
336     Require all granted 
337 </Location>     
338 <Location /opac/extras/startwith>
339     SetHandler perl-script
340     PerlHandler OpenILS::WWW::SuperCat::string_startwith
341     Options +ExecCGI
342     PerlSendHeader On
343     Require all granted 
344 </Location>     
345         
346 # ----------------------------------------------------------------------------------
347 # Module for displaying OpenSRF API documentation
348 # ----------------------------------------------------------------------------------
349 <Location /opac/extras/docgen.xsl>
350     AddOutputFilter INCLUDES .xsl
351 </Location>
352
353 # ----------------------------------------------------------------------------------
354 # Module for processing staff-client offline scripts lives here
355 # ----------------------------------------------------------------------------------
356 <Directory "/openils/var/cgi-bin/offline">
357     AddHandler cgi-script .pl
358     AllowOverride None
359     Options +ExecCGI
360     Require all granted 
361 </Directory>
362         
363         
364 # ----------------------------------------------------------------------------------
365 # XXX Note, it's important to explicitly set the JSON encoding style 
366 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
367 # with OpenSRF 1.0
368 # ----------------------------------------------------------------------------------
369 # OpenSRF JSON legacy gateway
370 # ----------------------------------------------------------------------------------
371 <Location /gateway>
372     SetHandler osrf_json_gateway_module
373     OSRFGatewayLegacyJSON "true"
374     Require all granted 
375 </Location>
376 # ----------------------------------------------------------------------------------
377 # New-style OpenSRF JSON gateway
378 # ----------------------------------------------------------------------------------
379 <Location /osrf-gateway-v1>
380     SetHandler osrf_json_gateway_module
381     OSRFGatewayLegacyJSON "false"
382     Require all granted 
383 </Location>
384
385 # ----------------------------------------------------------------------------------
386 # OpenSRF-over-HTTP translator
387 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
388 # ----------------------------------------------------------------------------------
389 <Location /osrf-http-translator>
390     SetHandler osrf_http_translator_module
391     Require all granted 
392 </Location>
393
394 # ----------------------------------------------------------------------------------
395 # The exporter lives here
396 # ----------------------------------------------------------------------------------
397 <Location /exporter>
398     SetHandler perl-script
399     AuthType Basic
400     AuthName "Exporter Login"
401     PerlOptions +GlobalRequest
402     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
403     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
404     require valid-user
405     PerlHandler OpenILS::WWW::Exporter
406     Options +ExecCGI
407     PerlSendHeader On
408     Require all granted 
409 </Location>
410
411 <Location /opac/extras/merge_template>
412     SetHandler perl-script
413     AuthType Basic
414     AuthName "Batch Update Login"
415     PerlOptions +GlobalRequest
416     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
417     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
418     require valid-user
419     PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
420     PerlSendHeader On
421     Options +ExecCGI
422     Require all granted 
423 </Location>
424
425 <Location /opac/extras/circ>
426     AuthType Basic
427     AuthName "Circ Extras Login"
428     PerlOptions +GlobalRequest
429     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
430     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
431     require valid-user
432     Options +ExecCGI
433     PerlSendHeader On
434     Require all granted 
435 </Location>
436
437 <Location /collections>
438     SetHandler perl-script
439     AuthType Basic
440     AuthName "Collections Login"
441     PerlOptions +GlobalRequest
442     PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
443     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
444     require valid-user
445     Options +ExecCGI
446     PerlSendHeader On
447     Require all granted 
448 </Location>
449
450
451 # ----------------------------------------------------------------------------------
452 # Reporting output lives here
453 # ----------------------------------------------------------------------------------
454 <Location /reporter/>
455     AuthType Basic
456     AuthName "Report Login"
457     PerlOptions +GlobalRequest
458     PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
459     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
460     require valid-user
461     Options +ExecCGI
462     PerlSendHeader On
463     Require all granted 
464 </Location>
465
466 # ----------------------------------------------------------------------------------
467 # Selfcheck interface
468 # ----------------------------------------------------------------------------------
469 <LocationMatch .*/selfcheck.xml>
470     AuthType Basic
471     AuthName "Self-check Login"
472     PerlOptions +GlobalRequest
473     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
474     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
475     require valid-user
476     Options +ExecCGI
477     PerlSendHeader On
478     Require all granted 
479 </LocationMatch>
480
481
482 # ----------------------------------------------------------------------------------
483 # Reports GUI
484 # ----------------------------------------------------------------------------------
485 <LocationMatch /reports>
486     SSILegacyExprParser on
487     Options +Includes
488     AddOutputFilter INCLUDES;XMLENT .xhtml
489 </LocationMatch>
490
491 <LocationMatch /reports/fm_IDL.xml>
492     IDLChunkStripPI "yes"
493     IDLChunkEscapeScript "no"
494     IDLChunkStripComments "yes"
495     IDLChunkStripDoctype "yes"
496     IDLChunkContentType "application/xml; charset=utf-8"
497     AddOutputFilter INCLUDES;IDLCHUNK .xml
498 </LocationMatch>
499
500 # ----------------------------------------------------------------------------------
501 # EDI Message viewer
502 # ----------------------------------------------------------------------------------
503 <Location /edi>
504     SetHandler perl-script
505     PerlHandler OpenILS::WWW::EDI
506     Options +ExecCGI
507     PerlSendHeader On
508     Require all granted 
509 </Location>     
510
511 # ----------------------------------------------------------------------------------
512 # XML-RPC gateway
513 # ----------------------------------------------------------------------------------
514 <Location /xml-rpc>
515     SetHandler perl-script
516     PerlHandler OpenILS::WWW::XMLRPCGateway
517     Options +ExecCGI
518     PerlSendHeader On
519     Require all granted 
520 </Location>
521
522 # ----------------------------------------------------------------------------------
523 # Conify - next-generation Evergreen administration interface
524 # ----------------------------------------------------------------------------------
525 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
526 <Location /conify>
527     SSILegacyExprParser on
528     Options +Includes
529     XMLEntStripPI "yes"
530     XMLEntEscapeScript "no"
531     XMLEntStripComments "no"
532     XMLEntContentType "text/html; charset=utf-8"
533     AddOutputFilter INCLUDES;XMLENT .html
534  
535     AuthType Basic
536     AuthName "Dojo Admin Login"
537     PerlOptions +GlobalRequest
538     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
539     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
540     require valid-user
541     Options +ExecCGI
542     PerlSendHeader On
543     Require all granted 
544 </Location>
545
546 <Location /vandelay-upload>
547     SetHandler perl-script
548     PerlHandler OpenILS::WWW::Vandelay::spool_marc
549     Options +ExecCGI
550     Require all granted 
551 </Location>
552
553 # OpenURL 0.1 searching based on OpenSearch
554 RewriteMap openurl prg:/openils/bin/openurl_map.pl
555 RewriteCond %{QUERY_STRING} (^.*$)
556 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
557
558
559
560 # General Evergreen web template processor
561 <Location /eg>
562     SetHandler perl-script
563     PerlHandler OpenILS::WWW::EGWeb
564     Options +ExecCGI
565     PerlSendHeader On
566     Require all granted 
567
568     PerlSetVar OILSWebBasePath "/eg"
569     PerlSetVar OILSWebWebDir "/openils/var/web"
570     PerlSetVar OILSWebDefaultTemplateExtension "tt2"
571
572     # Enable Template-Toolkit error debugging messages (apache error log)
573     PerlSetVar OILSWebDebugTemplate "true"
574
575     # -------------------------------------------------------
576     # Media Prefix.  In the 3rd example, the protocol (http) is enforced
577     #PerlSetVar OILSWebMediaPrefix "/media"
578     #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
579     #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
580
581     # Locale messages files:
582     #
583     # These appear in pairs; the first represents the user agent
584     # Accept-Language header locale, and the second represents
585     # the fully-qualified path for the corresponding PO file that
586     # contains the messages.
587     #
588     # If you enable two or more locales, then users will be able to
589     # select their preferred locale from a locale picker in the TPAC.
590     #
591     #PerlAddVar OILSWebLocale "en"
592     #PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.en.po"
593     #PerlAddVar OILSWebLocale "en_ca"
594     #PerlAddVar OILSWebLocale "/openils/var/data/locale/en-CA.po"
595     #PerlAddVar OILSWebLocale "fr_ca"
596     #PerlAddVar OILSWebLocale "/openils/var/data/locale/fr-CA.po"
597
598     # Set the default locale: defaults to en-US
599     #PerlAddVar OILSWebDefaultLocale "fr_ca"
600     
601     # Templates will be loaded from the following paths in reverse order.
602     PerlAddVar OILSWebTemplatePath "/openils/var/templates"
603     #PerlAddVar OILSWebTemplatePath "/openils/var/templates_localskin"
604
605     #-------------------------------------------------
606     # Added Content Configuration
607     #-------------------------------------------------
608     # Content Cafe
609     #SetEnv OILS_CONTENT_CAFE_USER MYUSER
610     #SetEnv OILS_CONTENT_CAFE_PASS MYPASS
611     
612     # LibraryThing
613     #SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
614     #SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
615     
616     # ChiliFresh
617     #SetEnv OILS_CHILIFRESH_ACCOUNT
618     #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
619     #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
620     #-------------------------------------------------
621
622     <IfModule mod_deflate.c>
623         SetOutputFilter DEFLATE
624         BrowserMatch ^Mozilla/4 gzip-only-text/html
625         BrowserMatch ^Mozilla/4\.0[678] no-gzip
626         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
627         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
628         <IfModule mod_headers.c>
629             Header append Cache-Control "public"
630             Header append Vary User-Agent env=!dont-vary
631         </IfModule>
632     </IfModule>
633 </Location>
634 <LocationMatch ^/(images|css|js)/>
635     # should pick up the default expire time from eg.conf...
636     <IfModule mod_deflate.c>
637         SetOutputFilter DEFLATE
638         BrowserMatch ^Mozilla/4 gzip-only-text/html
639         BrowserMatch ^Mozilla/4\.0[678] no-gzip
640         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
641         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
642         <IfModule mod_headers.c>
643             Header append Cache-Control "public"
644             Header append Vary User-Agent env=!dont-vary
645         </IfModule>
646     </IfModule>
647 </LocationMatch>
648 <Location /eg/opac>
649     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
650     # Expire the HTML quickly since we're loading dynamic data for each page
651     ExpiresActive On
652     ExpiresByType text/html "access plus 5 seconds"
653 </Location>
654 <Location /eg/kpac>
655     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
656     PerlSetVar KPacConfigFile "/openils/conf/kpac.xml.example"
657     ExpiresActive On
658     ExpiresByType text/html "access plus 5 seconds"
659 </Location>
660
661 # Note: the template processor will decline handling anything it does not
662 # have an explicit configuration for, which means it will fall back to 
663 # Apache to serve the file.  However, in the interest of speed, go ahead 
664 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
665 # Add more exemptions as needed.
666 <LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
667     SetHandler None
668 </LocationMatch>
669
670 # ----------------------------------------------------------------------------------
671 # Some mod_deflate logging setup
672 # ----------------------------------------------------------------------------------
673 <IfModule mod_deflate.c>
674     DeflateFilterNote Input instream
675     DeflateFilterNote Output outstream
676     DeflateFilterNote Ratio ratio
677
678     LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
679     CustomLog /var/log/apache2/deflate_log deflate
680
681     # There are problems with XMLENT and mod_deflate - so lets disable it
682     # This is where we don't have a pre-existing LocationMatch directive earlier
683     <LocationMatch /opac/.*\.xml$>
684         SetEnv no-gzip
685     </LocationMatch>
686     <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
687         SetEnv no-gzip
688     </LocationMatch>
689     <LocationMatch /reports/.*\.xhtml$>
690         SetEnv no-gzip
691     </LocationMatch>
692     <LocationMatch /conify/.*\.html$>
693         SetEnv no-gzip
694     </LocationMatch>
695 </IfModule>
696
697
698 <Location /IDL2js>
699
700     SetHandler perl-script
701     PerlHandler OpenILS::WWW::IDL2js
702     Options +ExecCGI
703     PerlSendHeader On
704     Require all granted 
705
706     <IfModule mod_headers.c>
707         Header append Cache-Control "public"
708     </IFModule>
709
710     <IfModule mod_deflate.c>
711         SetOutputFilter DEFLATE
712         BrowserMatch ^Mozilla/4 gzip-only-text/html
713         BrowserMatch ^Mozilla/4\.0[678] no-gzip
714         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
715         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
716         <IfModule mod_headers.c>
717             Header append Vary User-Agent env=!dont-vary
718         </IfModule>
719     </IfModule>
720 </Location>
721
722 # Uncomment the following to force SSL for everything. Note that this defeats caching
723 # and you will suffer a performance hit.
724 #RewriteCond %{HTTPS} off
725 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]