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