]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
AutoSuggest
[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     allow from all
235 </LocationMatch>
236
237
238 <LocationMatch /xul/.*\.xul$>
239     Options +Includes
240     XMLEntContentType "application/vnd.mozilla.xul+xml"
241     AddOutputFilter INCLUDES;XMLENT .xul
242     allow from all
243 </LocationMatch>
244
245 # ----------------------------------------------------------------------------------
246 # Self-serve password interface
247 # ----------------------------------------------------------------------------------
248 <Location /opac/password>
249     SetHandler perl-script
250     PerlHandler OpenILS::WWW::PasswordReset::password_reset
251     Options +ExecCGI
252     PerlSendHeader On
253     allow from all
254
255     # Force clients to use HTTPS
256     RewriteCond %{HTTPS} !=on [NC]
257     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
258 </Location>
259
260 # ----------------------------------------------------------------------------------
261 # Supercat feeds
262 # ----------------------------------------------------------------------------------
263 <Location /opac/extras/oisbn>
264     SetHandler perl-script
265     PerlHandler OpenILS::WWW::SuperCat::oisbn
266     Options +ExecCGI
267     PerlSendHeader On
268     allow from all
269 </Location>
270 <Location /opac/extras/supercat>
271     SetHandler perl-script
272     PerlHandler OpenILS::WWW::SuperCat::supercat
273     Options +ExecCGI
274     PerlSendHeader On
275     allow from all
276 </Location>
277 <Location /opac/extras/unapi>
278     SetHandler perl-script
279     PerlHandler OpenILS::WWW::SuperCat::unapi
280     Options +ExecCGI
281     PerlSendHeader On
282     allow from all
283 </Location>
284 <Location /opac/extras/feed/bookbag>
285     SetHandler perl-script
286     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
287     Options +ExecCGI
288     PerlSendHeader On
289     allow from all
290 </Location>
291 <Location /opac/extras/opensearch>
292     SetHandler perl-script
293     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
294     Options +ExecCGI
295     PerlSendHeader On
296     allow from all
297 </Location>
298 <Location /opac/extras/sru>
299     SetHandler perl-script
300     PerlHandler OpenILS::WWW::SuperCat::sru_search
301     Options +ExecCGI
302     PerlSendHeader On
303     allow from all
304 </Location>
305 <Location /opac/extras/sru_auth>
306     SetHandler perl-script
307     PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
308     Options +ExecCGI
309     PerlSendHeader On
310     allow from all
311 </Location>
312 <Location /opac/extras/feed/freshmeat>
313     SetHandler perl-script
314     PerlHandler OpenILS::WWW::SuperCat::changes_feed
315     Options +ExecCGI
316     PerlSendHeader On
317     allow from all
318 </Location>
319 <Location /opac/extras/browse>
320     SetHandler perl-script
321     PerlHandler OpenILS::WWW::SuperCat::string_browse
322     Options +ExecCGI
323     PerlSendHeader On
324     allow from all
325 </Location>     
326 <Location /opac/extras/startwith>
327     SetHandler perl-script
328     PerlHandler OpenILS::WWW::SuperCat::string_startwith
329     Options +ExecCGI
330     PerlSendHeader On
331     allow from all
332 </Location>     
333         
334 # ----------------------------------------------------------------------------------
335 # Module for displaying OpenSRF API documentation
336 # ----------------------------------------------------------------------------------
337 <Location /opac/extras/docgen.xsl>
338     AddOutputFilter INCLUDES .xsl
339 </Location>
340
341 # ----------------------------------------------------------------------------------
342 # Module for processing staff-client offline scripts lives here
343 # ----------------------------------------------------------------------------------
344 <Directory "/openils/var/cgi-bin/offline">
345     AddHandler cgi-script .pl
346     AllowOverride None
347     Options +ExecCGI
348     allow from all
349 </Directory>
350         
351         
352 # ----------------------------------------------------------------------------------
353 # XXX Note, it's important to explicitly set the JSON encoding style 
354 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
355 # with OpenSRF 1.0
356 # ----------------------------------------------------------------------------------
357 # OpenSRF JSON legacy gateway
358 # ----------------------------------------------------------------------------------
359 <Location /gateway>
360     SetHandler osrf_json_gateway_module
361     OSRFGatewayLegacyJSON "true"
362     allow from all
363 </Location>
364 # ----------------------------------------------------------------------------------
365 # New-style OpenSRF JSON gateway
366 # ----------------------------------------------------------------------------------
367 <Location /osrf-gateway-v1>
368     SetHandler osrf_json_gateway_module
369     OSRFGatewayLegacyJSON "false"
370     allow from all
371 </Location>
372
373 # ----------------------------------------------------------------------------------
374 # OpenSRF-over-HTTP translator
375 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
376 # ----------------------------------------------------------------------------------
377 <Location /osrf-http-translator>
378     SetHandler osrf_http_translator_module
379     allow from all
380 </Location>
381
382 # ----------------------------------------------------------------------------------
383 # The exporter lives here
384 # ----------------------------------------------------------------------------------
385 <Location /exporter>
386     SetHandler perl-script
387     AuthType Basic
388     AuthName "Exporter Login"
389     PerlOptions +GlobalRequest
390     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
391     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
392     require valid-user
393     PerlHandler OpenILS::WWW::Exporter
394     Options +ExecCGI
395     PerlSendHeader On
396     allow from all
397 </Location>
398
399 <Location /opac/extras/merge_template>
400     SetHandler perl-script
401     AuthType Basic
402     AuthName "Batch Update Login"
403     PerlOptions +GlobalRequest
404     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
405     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
406     require valid-user
407     PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
408     PerlSendHeader On
409     Options +ExecCGI
410     allow from all
411 </Location>
412
413 <Location /opac/extras/circ>
414     AuthType Basic
415     AuthName "Circ Extras Login"
416     PerlOptions +GlobalRequest
417     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
418     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
419     require valid-user
420     Options +ExecCGI
421     PerlSendHeader On
422     allow from all
423 </Location>
424
425 # ----------------------------------------------------------------------------------
426 # Reporting output lives here
427 # ----------------------------------------------------------------------------------
428 <Location /reporter/>
429     AuthType Basic
430     AuthName "Report Login"
431     PerlOptions +GlobalRequest
432     PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
433     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
434     require valid-user
435     Options +ExecCGI
436     PerlSendHeader On
437     allow from all
438 </Location>
439
440 # ----------------------------------------------------------------------------------
441 # Selfcheck interface
442 # ----------------------------------------------------------------------------------
443 <LocationMatch .*/selfcheck.xml>
444     AuthType Basic
445     AuthName "Self-check Login"
446     PerlOptions +GlobalRequest
447     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
448     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
449     require valid-user
450     Options +ExecCGI
451     PerlSendHeader On
452     allow from all
453 </LocationMatch>
454
455
456 # ----------------------------------------------------------------------------------
457 # Reports GUI
458 # ----------------------------------------------------------------------------------
459 <LocationMatch /reports>
460     Options +Includes
461     AddOutputFilter INCLUDES;XMLENT .xhtml
462 </LocationMatch>
463
464 <LocationMatch /reports/fm_IDL.xml>
465     IDLChunkStripPI "yes"
466     IDLChunkEscapeScript "no"
467     IDLChunkStripComments "yes"
468     IDLChunkStripDoctype "yes"
469     IDLChunkContentType "application/xml; charset=utf-8"
470     AddOutputFilter INCLUDES;IDLCHUNK .xml
471 </LocationMatch>
472
473 # ----------------------------------------------------------------------------------
474 # EDI Message viewer
475 # ----------------------------------------------------------------------------------
476 <Location /edi>
477     SetHandler perl-script
478     PerlHandler OpenILS::WWW::EDI
479     Options +ExecCGI
480     PerlSendHeader On
481     allow from all
482 </Location>     
483
484 # ----------------------------------------------------------------------------------
485 # XML-RPC gateway
486 # ----------------------------------------------------------------------------------
487 <Location /xml-rpc>
488     SetHandler perl-script
489     PerlHandler OpenILS::WWW::XMLRPCGateway
490     Options +ExecCGI
491     PerlSendHeader On
492     allow from all
493 </Location>
494
495 # ----------------------------------------------------------------------------------
496 # Conify - next-generation Evergreen administration interface
497 # ----------------------------------------------------------------------------------
498 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
499 <Location /conify>
500     Options +Includes
501     XMLEntStripPI "yes"
502     XMLEntEscapeScript "no"
503     XMLEntStripComments "no"
504     XMLEntContentType "text/html; charset=utf-8"
505     AddOutputFilter INCLUDES;XMLENT .html
506  
507     AuthType Basic
508     AuthName "Dojo Admin Login"
509     PerlOptions +GlobalRequest
510     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
511     PerlAuthenHandler OpenILS::WWW::Proxy::Authen
512     require valid-user
513     Options +ExecCGI
514     PerlSendHeader On
515     allow from all
516 </Location>
517
518 <Location /vandelay-upload>
519     SetHandler perl-script
520     PerlHandler OpenILS::WWW::Vandelay::spool_marc
521     Options +ExecCGI
522     allow from all
523 </Location>
524
525 # OpenURL 0.1 searching based on OpenSearch
526 RewriteMap openurl prg:/openils/bin/openurl_map.pl
527 RewriteCond %{QUERY_STRING} (^.*$)
528 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
529
530
531
532 # General Evergreen web template processor
533 <Location /eg>
534     SetHandler perl-script
535     PerlHandler OpenILS::WWW::EGWeb
536     Options +ExecCGI
537     PerlSendHeader On
538     allow from all
539
540     PerlSetVar OILSWebBasePath "/eg"
541     PerlSetVar OILSWebWebDir "/openils/var/web"
542     PerlSetVar OILSWebDefaultTemplateExtension "tt2"
543
544     # Enable Template-Toolkit error debugging messages (apache error log)
545     PerlSetVar OILSWebDebugTemplate "true"
546
547     # -------------------------------------------------------
548     # Media Prefix.  In the 3rd example, the protocol (http) is enforced
549     #PerlSetVar OILSWebMediaPrefix "/media"
550     #PerlSetVar OILSWebMediaPrefix "static.example.com/media"
551     #PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
552
553     # Locale messages files
554     #PerlAddVar OILSWebLocale "en"
555     #PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.en.po"
556     #PerlAddVar OILSWebLocale "en_ca"
557     #PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.en_ca.po"
558     #PerlAddVar OILSWebLocale "fr_ca"
559     #PerlAddVar OILSWebLocale "/openils/var/data/locale/messages.fr_ca.po"
560
561     # Templates will be loaded from the following paths in reverse order.
562     PerlAddVar OILSWebTemplatePath "/openils/var/templates"
563     #PerlAddVar OILSWebTemplatePath "/openils/var/templates_localskin"
564
565     <IfModule mod_deflate.c>
566         SetOutputFilter DEFLATE
567         BrowserMatch ^Mozilla/4 gzip-only-text/html
568         BrowserMatch ^Mozilla/4\.0[678] no-gzip
569         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
570         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
571         <IfModule mod_headers.c>
572             Header append Cache-Control "public"
573             Header append Vary User-Agent env=!dont-vary
574         </IfModule>
575     </IfModule>
576 </Location>
577 <LocationMatch ^/(images|css|js)/>
578     # should pick up the default expire time from eg.conf...
579     <IfModule mod_deflate.c>
580         SetOutputFilter DEFLATE
581         BrowserMatch ^Mozilla/4 gzip-only-text/html
582         BrowserMatch ^Mozilla/4\.0[678] no-gzip
583         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
584         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
585         <IfModule mod_headers.c>
586             Header append Cache-Control "public"
587             Header append Vary User-Agent env=!dont-vary
588         </IfModule>
589     </IfModule>
590 </LocationMatch>
591 <Location /eg/opac>
592     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
593     # Expire the HTML quickly since we're loading dynamic data for each page
594     ExpiresActive On
595     ExpiresByType text/html "access plus 5 seconds"
596     
597     # For use with embedded Content Cafe content
598     #SetEnv OILS_CONTENT_CAFE_USER 123
599     #SetEnv OILS_CONTENT_CAFE_PASS 456
600     # Consider copying/moving other added content configs 
601     # (e.g. NOVELIST) into here or to an outer container shared by
602     # both /opac and /eg/opac since some are used in both places
603 </Location>
604
605
606 # Note: the template processor will decline handling anything it does not
607 # have an explicit configuration for, which means it will fall back to 
608 # Apache to serve the file.  However, in the interest of speed, go ahead 
609 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
610 # Add more exemptions as needed.
611 <LocationMatch ^/eg/.*(\.js|\.css|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
612     SetHandler None
613 </LocationMatch>
614
615 # ----------------------------------------------------------------------------------
616 # Some mod_deflate logging setup
617 # ----------------------------------------------------------------------------------
618 <IfModule mod_deflate.c>
619     DeflateFilterNote Input instream
620     DeflateFilterNote Output outstream
621     DeflateFilterNote Ratio ratio
622
623     LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
624     CustomLog /var/log/apache2/deflate_log deflate
625 </IfModule>
626
627
628 <Location /IDL2js>
629
630     SetHandler perl-script
631     PerlHandler OpenILS::WWW::IDL2js
632     Options +ExecCGI
633     PerlSendHeader On
634     allow from all
635
636     <IfModule mod_headers.c>
637         Header append Cache-Control "public"
638     </IFModule>
639
640     <IfModule mod_deflate.c>
641         SetOutputFilter DEFLATE
642         BrowserMatch ^Mozilla/4 gzip-only-text/html
643         BrowserMatch ^Mozilla/4\.0[678] no-gzip
644         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
645         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
646         <IfModule mod_headers.c>
647             Header append Vary User-Agent env=!dont-vary
648         </IfModule>
649     </IfModule>
650 </Location>
651
652 # Uncomment the following to force SSL for everything. Note that this defeats caching
653 # and you will suffer a performance hit.
654 #RewriteCond %{HTTPS} off
655 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]