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