1 # ----------------------------------------------------------------------------------
2 # This is the global Evergreen virtual host config. Anything you want published
3 # through all virtual hosts (port 80, port 443, etc.) should live in here.
4 # ----------------------------------------------------------------------------------
6 # ----------------------------------------------------------------------------------
7 # Point / to the opac - if you have a custom skin or locale, point at it here
8 # ----------------------------------------------------------------------------------
9 RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
11 # ----------------------------------------------------------------------------------
12 # Assign a default locale to the accessible OPAC
13 # ----------------------------------------------------------------------------------
14 RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpac/start.html
15 RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html
17 # ----------------------------------------------------------------------------------
18 # Configure the gateway
19 # ----------------------------------------------------------------------------------
20 OSRFGatewayConfig /openils/conf/opensrf_core.xml
21 # Translator memcache server. Default is localhost
22 # OSRFTranslatorCacheServer 127.0.0.1:11211
25 # ----------------------------------------------------------------------------------
26 # Added content plugin
27 # ----------------------------------------------------------------------------------
28 <Location /opac/extras/ac/>
29 SetHandler perl-script
30 PerlHandler OpenILS::WWW::AddedContent
36 # ----------------------------------------------------------------------------------
37 # Replace broken cover images with a transparent GIF by default
38 # ----------------------------------------------------------------------------------
40 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
41 /opac/images/blank.png [P,L]
43 # ----------------------------------------------------------------------------------
44 # Add the row ID (RID) and date so we can make unAPI happy
45 # ----------------------------------------------------------------------------------
47 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
48 RewriteRule - - [E=OILS_OPAC_RID:%2]
49 RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}] [L]
51 # ----------------------------------------------------------------------------------
52 # Pull the locale from the URL
53 # ----------------------------------------------------------------------------------
55 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
56 RewriteRule - - [E=locale:%1] [L]
58 # ----------------------------------------------------------------------------------
60 # ----------------------------------------------------------------------------------
61 <LocationMatch /opac/>
62 AddType application/xhtml+xml .xml
64 # - configure mod_xmlent
66 XMLEntEscapeScript "no"
67 XMLEntStripComments "yes"
68 XMLEntContentType "text/html; charset=utf-8"
69 # forces quirks mode which we want for now
70 XMLEntStripDoctype "yes"
72 # - set up the include handlers
74 AddOutputFilter INCLUDES .xsl
75 AddOutputFilter INCLUDES;XMLENT .xml
77 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
79 # This gives you the option to configure a different host to serve OPAC images from
80 # Specify the hostname (without protocol) and path to the images. Protocol will
81 # be determined at runtime
82 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
84 # In addition to loading images from a static host, you can also load CSS and/or
85 # Javascript from a static host or hosts. Protocol will be determined at runtime
86 # and/or by configuration options immediately following.
87 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
88 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
90 # If you are not able to serve static content via https and
91 # wish to force http:// (and are comfortable with mixed-content
92 # warnings in client browsers), set this:
93 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
95 # If you would prefer to fall back to your non-static servers for
96 # https pages, avoiding mixed-content warnings in client browsers
97 # and are willing to accept some increased server load, set this:
98 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
100 # Specify a ChiliFresh account to integrate their services with the OPAC
101 #SetEnv OILS_CHILIFRESH_ACCOUNT
102 #SetEnv OILS_CHILIFRESH_PROFILE
103 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
105 # Specify the initial script URL for Novelist (containing account credentials, etc.)
106 #SetEnv OILS_NOVELIST_URL
109 # Uncomment to force SSL any time a patron is logged in. This protects
110 # authentication tokens. Left commented out for backwards compat for now.
111 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
116 # ----------------------------------------------------------------------------------
117 # Force SSL on the OPAC's "My Account" page
118 # ----------------------------------------------------------------------------------
119 <LocationMatch .*/myopac.xml>
123 <LocationMatch /opac/extras/>
124 # Force to en-US for now to satisfy bbags.xml
127 AddOutputFilter INCLUDES .xml
128 AddType application/xhtml+xml .xml
132 RewriteCond %{QUERY_STRING} locale=([^&]*)
133 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
134 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
135 AddOutputFilter INCLUDES;XMLENT .html
138 # ----------------------------------------------------------------------------------
139 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
140 # ----------------------------------------------------------------------------------
142 RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2})
143 RewriteRule ^/xul/ - [E=locale:%1]
144 RewriteRule ^/reports/ - [E=locale:%1] [L]
146 # Default to en-US if we haven't matched a locale of the form xx-YY
148 RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2})
149 RewriteRule ^/xul/ - [E=locale:en-US]
150 RewriteRule ^/reports/ - [E=locale:en-US] [L]
152 # Default to en-US if we are just given en
154 RewriteCond %{ENV:locale} ^$ [OR]
155 RewriteCond %{ENV:locale} ^en$
156 RewriteRule - - [E=locale:en-US] [L]
158 <LocationMatch /xul/.*\.x?html$>
160 XMLEntEscapeScript "no"
161 XMLEntStripComments "yes"
163 XMLEntStripDoctype "yes"
164 XMLEntContentType "text/html; charset=utf-8"
165 AddOutputFilter INCLUDES;XMLENT .xhtml
166 AddOutputFilter INCLUDES;XMLENT .html
171 <LocationMatch /xul/.*\.xul$>
173 XMLEntContentType "application/vnd.mozilla.xul+xml"
174 AddOutputFilter INCLUDES;XMLENT .xul
178 # ----------------------------------------------------------------------------------
179 # Self-serve password interface
180 # ----------------------------------------------------------------------------------
181 <Location /opac/password>
182 SetHandler perl-script
183 PerlHandler OpenILS::WWW::PasswordReset::password_reset
188 # Force clients to use HTTPS
190 RewriteCond %{HTTPS} !=on [NC]
191 RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
194 # ----------------------------------------------------------------------------------
196 # ----------------------------------------------------------------------------------
197 <Location /opac/extras/oisbn>
198 SetHandler perl-script
199 PerlHandler OpenILS::WWW::SuperCat::oisbn
204 <Location /opac/extras/supercat>
205 SetHandler perl-script
206 PerlHandler OpenILS::WWW::SuperCat::supercat
211 <Location /opac/extras/unapi>
212 SetHandler perl-script
213 PerlHandler OpenILS::WWW::SuperCat::unapi
218 <Location /opac/extras/feed/bookbag>
219 SetHandler perl-script
220 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
225 <Location /opac/extras/opensearch>
226 SetHandler perl-script
227 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
232 <Location /opac/extras/sru>
233 SetHandler perl-script
234 PerlHandler OpenILS::WWW::SuperCat::sru_search
239 <Location /opac/extras/feed/freshmeat>
240 SetHandler perl-script
241 PerlHandler OpenILS::WWW::SuperCat::changes_feed
246 <Location /opac/extras/browse>
247 SetHandler perl-script
248 PerlHandler OpenILS::WWW::SuperCat::string_browse
253 <Location /opac/extras/startwith>
254 SetHandler perl-script
255 PerlHandler OpenILS::WWW::SuperCat::string_startwith
261 # ----------------------------------------------------------------------------------
262 # Module for displaying OpenSRF API documentation
263 # ----------------------------------------------------------------------------------
264 <Location /opac/extras/docgen.xsl>
265 AddOutputFilter INCLUDES .xsl
268 # ----------------------------------------------------------------------------------
269 # Module for processing staff-client offline scripts lives here
270 # ----------------------------------------------------------------------------------
271 <Directory "/openils/var/cgi-bin/offline">
272 AddHandler cgi-script .pl
279 # ----------------------------------------------------------------------------------
280 # XXX Note, it's important to explicitly set the JSON encoding style
281 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
283 # ----------------------------------------------------------------------------------
284 # OpenSRF JSON legacy gateway
285 # ----------------------------------------------------------------------------------
287 SetHandler osrf_json_gateway_module
288 OSRFGatewayLegacyJSON "true"
291 # ----------------------------------------------------------------------------------
292 # New-style OpenSRF JSON gateway
293 # ----------------------------------------------------------------------------------
294 <Location /osrf-gateway-v1>
295 SetHandler osrf_json_gateway_module
296 OSRFGatewayLegacyJSON "false"
300 # ----------------------------------------------------------------------------------
301 # OpenSRF-over-HTTP translator
302 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
303 # ----------------------------------------------------------------------------------
304 <Location /osrf-http-translator>
305 SetHandler osrf_http_translator_module
309 # ----------------------------------------------------------------------------------
310 # The exporter lives here
311 # ----------------------------------------------------------------------------------
313 SetHandler perl-script
314 PerlSetVar OILSProxyTitle "Exporter Login"
315 PerlSetVar OILSProxyDescription "Please log in with an authorized staff account to export records"
316 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
317 PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
323 # ----------------------------------------------------------------------------------
324 # Reporting output lives here
325 # ----------------------------------------------------------------------------------
326 <Location /reporter/>
327 SetHandler perl-script
328 PerlSetVar OILSProxyTitle "Report Login"
329 PerlSetVar OILSProxyDescription "Please log in with an authorized staff account to view this report"
330 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
331 PerlHandler OpenILS::WWW::Proxy
337 # ----------------------------------------------------------------------------------
338 # Selfcheck interface
339 # ----------------------------------------------------------------------------------
340 <LocationMatch .*/selfcheck.xml>
341 SetHandler perl-script
342 PerlSetVar OILSProxyTitle "Self-check Login"
343 PerlSetVar OILSProxyDescription "Please log in with an authorized staff account to activate the self-check interface"
344 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
345 PerlHandler OpenILS::WWW::Proxy
352 # ----------------------------------------------------------------------------------
354 # ----------------------------------------------------------------------------------
355 <LocationMatch /reports>
357 AddOutputFilter INCLUDES;XMLENT .xhtml
360 <LocationMatch /reports/fm_IDL.xml>
361 IDLChunkStripPI "yes"
362 IDLChunkEscapeScript "no"
363 IDLChunkStripComments "yes"
364 IDLChunkStripDoctype "yes"
365 IDLChunkContentType "application/xml; charset=utf-8"
366 AddOutputFilter INCLUDES;IDLCHUNK .xml
369 # ----------------------------------------------------------------------------------
371 # ----------------------------------------------------------------------------------
373 SetHandler perl-script
374 PerlHandler OpenILS::WWW::XMLRPCGateway
380 # ----------------------------------------------------------------------------------
381 # Conify - next-generation Evergreen administration interface
382 # ----------------------------------------------------------------------------------
384 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
388 XMLEntEscapeScript "no"
389 XMLEntStripComments "no"
390 XMLEntContentType "text/html; charset=utf-8"
391 AddOutputFilter INCLUDES;XMLENT .html
393 SetHandler perl-script
394 PerlSetVar OILSProxyTitle "Dojo Admin Login"
395 PerlSetVar OILSProxyDescription "Please log in with an authorized staff account to administer Evergreen"
396 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
397 PerlHandler OpenILS::WWW::Proxy
403 # ----------------------------------------------------------------------------------
404 # Vandelay importers / exporters (your Web interface to bibliographic travel)
405 # ----------------------------------------------------------------------------------
406 RedirectMatch 301 ^/vandelay/vandelay.xml(.*)$ /vandelay/en-US/vandelay.xml$1
409 RewriteRule ^/vandelay/([a-z]{2}-[A-Z]{2})/(.*)$ /vandelay/$2 [E=locale:$1]
411 <LocationMatch /vandelay.*xml>
413 XMLEntEscapeScript "no"
414 XMLEntStripComments "yes"
415 XMLEntContentType "text/html; charset=utf-8"
416 XMLEntStripDoctype "yes"
417 AddOutputFilter INCLUDES;XMLENT .xml
418 SetHandler perl-script
419 PerlSetVar OILSProxyTitle "Vandelay Login"
420 PerlSetVar OILSProxyDescription "Please log in with an authorized staff account to import MARC records"
421 PerlSetVar OILSProxyPermissions "IMPORT_MARC"
422 PerlHandler OpenILS::WWW::Proxy
427 <Location /vandelay-upload>
428 SetHandler perl-script
429 PerlHandler OpenILS::WWW::Vandelay::spool_marc
434 # OpenURL 0.1 searching based on OpenSearch
436 RewriteMap openurl prg:/openils/bin/openurl_map.pl
437 RewriteCond %{QUERY_STRING} (^.*$)
438 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
442 # General Evergreen web template processor
444 SetHandler perl-script
445 PerlHandler OpenILS::WWW::EGWeb
450 # Note: the template processor will decline handling anything it does not
451 # have an explicit configuration for, which means it will fall back to
452 # Apache to serve the file. However, in the interest of speed, go ahead
453 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
454 # Add more exemptions as needed.
455 <LocationMatch ^/eg/.*(\.js|\.css|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>