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 -- Craftsman is the new default. Swap lines for the old skin.
8 # ----------------------------------------------------------------------------------
9 # RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
10 RedirectMatch 301 ^/$ /opac/en-US/skin/craftsman/xml/index.xml
12 # ----------------------------------------------------------------------------------
13 # Assign a default locale to the accessible OPAC
14 # ----------------------------------------------------------------------------------
15 RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpac/start.html
16 RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html
18 # ----------------------------------------------------------------------------------
19 # Configure the gateway
20 # ----------------------------------------------------------------------------------
21 OSRFGatewayConfig /openils/conf/opensrf_core.xml
22 # Translator memcache server. Default is localhost
23 # OSRFTranslatorCacheServer 127.0.0.1:11211
26 # ----------------------------------------------------------------------------------
27 # Added content plugin
28 # ----------------------------------------------------------------------------------
29 <Location /opac/extras/ac/>
30 SetHandler perl-script
31 PerlHandler OpenILS::WWW::AddedContent
37 # ----------------------------------------------------------------------------------
38 # Replace broken cover images with a transparent GIF by default
39 # ----------------------------------------------------------------------------------
41 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
42 /opac/images/blank.png [P,L]
44 # ----------------------------------------------------------------------------------
45 # Add the row ID (RID) and date so we can make unAPI happy
46 # ----------------------------------------------------------------------------------
48 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
49 RewriteRule - - [E=OILS_OPAC_RID:%2]
50 RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}] [L]
52 # ----------------------------------------------------------------------------------
53 # Pull the locale from the URL
54 # ----------------------------------------------------------------------------------
56 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
57 RewriteRule - - [E=locale:%1] [L]
59 # ----------------------------------------------------------------------------------
61 # ----------------------------------------------------------------------------------
62 <LocationMatch /opac/>
63 AddType application/xhtml+xml .xml
65 # - configure mod_xmlent
67 XMLEntEscapeScript "no"
68 XMLEntStripComments "yes"
69 XMLEntContentType "text/html; charset=utf-8"
70 # forces quirks mode which we want for now
71 XMLEntStripDoctype "yes"
73 # - set up the include handlers
75 AddOutputFilter INCLUDES .xsl
76 AddOutputFilter INCLUDES;XMLENT .xml
78 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
80 # This gives you the option to configure a different host to serve OPAC images from
81 # Specify the hostname (without protocol) and path to the images. Protocol will
82 # be determined at runtime
83 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
85 # In addition to loading images from a static host, you can also load CSS and/or
86 # Javascript from a static host or hosts. Protocol will be determined at runtime
87 # and/or by configuration options immediately following.
88 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
89 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
91 # If you are not able to serve static content via https and
92 # wish to force http:// (and are comfortable with mixed-content
93 # warnings in client browsers), set this:
94 #SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
96 # If you would prefer to fall back to your non-static servers for
97 # https pages, avoiding mixed-content warnings in client browsers
98 # and are willing to accept some increased server load, set this:
99 #SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
101 # Specify a ChiliFresh account to integrate their services with the OPAC
102 #SetEnv OILS_CHILIFRESH_ACCOUNT
103 #SetEnv OILS_CHILIFRESH_PROFILE
104 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
106 # Specify the initial script URL for Novelist (containing account credentials, etc.)
107 #SetEnv OILS_NOVELIST_URL
110 # Uncomment to force SSL any time a patron is logged in. This protects
111 # authentication tokens. Left commented out for backwards compat for now.
112 #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
117 # ----------------------------------------------------------------------------------
118 # Force SSL on the OPAC's "My Account" page
119 # ----------------------------------------------------------------------------------
120 <LocationMatch .*/myopac.xml>
124 <LocationMatch /opac/extras/>
125 # Force to en-US for now to satisfy bbags.xml
128 AddOutputFilter INCLUDES .xml
129 AddType application/xhtml+xml .xml
133 RewriteCond %{QUERY_STRING} locale=([^&]*)
134 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
135 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
136 AddOutputFilter INCLUDES;XMLENT .html
139 # ----------------------------------------------------------------------------------
140 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
141 # ----------------------------------------------------------------------------------
143 RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2})
144 RewriteRule ^/xul/ - [E=locale:%1]
145 RewriteRule ^/reports/ - [E=locale:%1] [L]
147 # Default to en-US if we haven't matched a locale of the form xx-YY
149 RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2})
150 RewriteRule ^/xul/ - [E=locale:en-US]
151 RewriteRule ^/reports/ - [E=locale:en-US] [L]
153 # Default to en-US if we are just given en
155 RewriteCond %{ENV:locale} ^$ [OR]
156 RewriteCond %{ENV:locale} ^en$
157 RewriteRule - - [E=locale:en-US] [L]
159 <LocationMatch /xul/.*\.x?html$>
161 XMLEntEscapeScript "no"
162 XMLEntStripComments "yes"
164 XMLEntStripDoctype "yes"
165 XMLEntContentType "text/html; charset=utf-8"
166 AddOutputFilter INCLUDES;XMLENT .xhtml
167 AddOutputFilter INCLUDES;XMLENT .html
172 <LocationMatch /xul/.*\.xul$>
174 XMLEntContentType "application/vnd.mozilla.xul+xml"
175 AddOutputFilter INCLUDES;XMLENT .xul
179 # ----------------------------------------------------------------------------------
180 # Self-serve password interface
181 # ----------------------------------------------------------------------------------
182 <Location /opac/password>
183 SetHandler perl-script
184 PerlHandler OpenILS::WWW::PasswordReset::password_reset
189 # Force clients to use HTTPS
191 RewriteCond %{HTTPS} !=on [NC]
192 RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
195 # ----------------------------------------------------------------------------------
197 # ----------------------------------------------------------------------------------
198 <Location /opac/extras/oisbn>
199 SetHandler perl-script
200 PerlHandler OpenILS::WWW::SuperCat::oisbn
205 <Location /opac/extras/supercat>
206 SetHandler perl-script
207 PerlHandler OpenILS::WWW::SuperCat::supercat
212 <Location /opac/extras/unapi>
213 SetHandler perl-script
214 PerlHandler OpenILS::WWW::SuperCat::unapi
219 <Location /opac/extras/feed/bookbag>
220 SetHandler perl-script
221 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
226 <Location /opac/extras/opensearch>
227 SetHandler perl-script
228 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
233 <Location /opac/extras/sru>
234 SetHandler perl-script
235 PerlHandler OpenILS::WWW::SuperCat::sru_search
240 <Location /opac/extras/feed/freshmeat>
241 SetHandler perl-script
242 PerlHandler OpenILS::WWW::SuperCat::changes_feed
247 <Location /opac/extras/browse>
248 SetHandler perl-script
249 PerlHandler OpenILS::WWW::SuperCat::string_browse
255 # ----------------------------------------------------------------------------------
256 # Module for displaying OpenSRF API documentation
257 # ----------------------------------------------------------------------------------
258 <Location /opac/extras/docgen.xsl>
259 AddOutputFilter INCLUDES .xsl
262 # ----------------------------------------------------------------------------------
263 # Module for processing staff-client offline scripts lives here
264 # ----------------------------------------------------------------------------------
265 <Directory "/openils/var/cgi-bin/offline">
266 AddHandler cgi-script .pl
273 # ----------------------------------------------------------------------------------
274 # XXX Note, it's important to explicitly set the JSON encoding style
275 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
277 # ----------------------------------------------------------------------------------
278 # OpenSRF JSON legacy gateway
279 # ----------------------------------------------------------------------------------
281 SetHandler osrf_json_gateway_module
282 OSRFGatewayLegacyJSON "true"
285 # ----------------------------------------------------------------------------------
286 # New-style OpenSRF JSON gateway
287 # ----------------------------------------------------------------------------------
288 <Location /osrf-gateway-v1>
289 SetHandler osrf_json_gateway_module
290 OSRFGatewayLegacyJSON "false"
294 # ----------------------------------------------------------------------------------
295 # OpenSRF-over-HTTP translator
296 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
297 # ----------------------------------------------------------------------------------
298 <Location /osrf-http-translator>
299 SetHandler osrf_http_translator_module
303 # ----------------------------------------------------------------------------------
304 # The exporter lives here
305 # ----------------------------------------------------------------------------------
307 SetHandler perl-script
308 PerlSetVar OILSProxyTitle "Exporter Login"
309 PerlSetVar OILSProxyDescription "Please log in to export records"
310 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
311 PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
317 # ----------------------------------------------------------------------------------
318 # Reporting output lives here
319 # ----------------------------------------------------------------------------------
320 <Location /reporter/>
321 SetHandler perl-script
322 PerlSetVar OILSProxyTitle "Report Login"
323 PerlSetVar OILSProxyDescription "Please log in to view this report"
324 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
325 PerlHandler OpenILS::WWW::Proxy
331 # ----------------------------------------------------------------------------------
332 # Selfcheck interface
333 # ----------------------------------------------------------------------------------
334 <LocationMatch .*/selfcheck.xml>
335 SetHandler perl-script
336 PerlSetVar OILSProxyTitle "Selfcheck Login"
337 PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface"
338 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
339 PerlHandler OpenILS::WWW::Proxy
346 # ----------------------------------------------------------------------------------
348 # ----------------------------------------------------------------------------------
349 <LocationMatch /reports>
351 AddOutputFilter INCLUDES;XMLENT .xhtml
354 <LocationMatch /reports/fm_IDL.xml>
355 IDLChunkStripPI "yes"
356 IDLChunkEscapeScript "no"
357 IDLChunkStripComments "yes"
358 IDLChunkStripDoctype "yes"
359 IDLChunkContentType "application/xml; charset=utf-8"
360 AddOutputFilter INCLUDES;IDLCHUNK .xml
363 # ----------------------------------------------------------------------------------
365 # ----------------------------------------------------------------------------------
367 SetHandler perl-script
368 PerlHandler OpenILS::WWW::XMLRPCGateway
374 # ----------------------------------------------------------------------------------
375 # Conify - next-generation Evergreen administration interface
376 # ----------------------------------------------------------------------------------
378 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
382 XMLEntEscapeScript "no"
383 XMLEntStripComments "no"
384 XMLEntContentType "text/html; charset=utf-8"
385 AddOutputFilter INCLUDES;XMLENT .html
387 SetHandler perl-script
388 PerlSetVar OILSProxyTitle "Dojo Admin Login"
389 PerlSetVar OILSProxyDescription "Please log in to administer Evergreen"
390 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
391 PerlHandler OpenILS::WWW::Proxy
397 # ----------------------------------------------------------------------------------
398 # Vandelay importers / exporters (your Web interface to bibliographic travel)
399 # ----------------------------------------------------------------------------------
400 RedirectMatch 301 ^/vandelay/vandelay.xml(.*)$ /vandelay/en-US/vandelay.xml$1
403 RewriteRule ^/vandelay/([a-z]{2}-[A-Z]{2})/(.*)$ /vandelay/$2 [E=locale:$1]
405 <LocationMatch /vandelay.*xml>
407 XMLEntEscapeScript "no"
408 XMLEntStripComments "yes"
409 XMLEntContentType "text/html; charset=utf-8"
410 XMLEntStripDoctype "yes"
411 AddOutputFilter INCLUDES;XMLENT .xml
412 SetHandler perl-script
413 PerlSetVar OILSProxyTitle "Vandelay Login"
414 PerlSetVar OILSProxyDescription "Please log in to import MARC records"
415 PerlSetVar OILSProxyPermissions "IMPORT_MARC"
416 PerlHandler OpenILS::WWW::Proxy
421 <Location /vandelay-upload>
422 SetHandler perl-script
423 PerlHandler OpenILS::WWW::Vandelay::spool_marc
428 # OpenURL 0.1 searching based on OpenSearch
430 RewriteMap openurl prg:/openils/bin/openurl_map.pl
431 RewriteCond %{QUERY_STRING} (^.*$)
432 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
436 # General Evergreen web template processor
438 SetHandler perl-script
439 PerlHandler OpenILS::WWW::EGWeb
444 # Note: the template processor will decline handling anything it does not
445 # have an explicit configuration for, which means it will fall back to
446 # Apache to serve the file. However, in the interest of speed, go ahead
447 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
448 # Add more exemptions as needed.
449 <LocationMatch ^/eg/.*(\.js|\.css|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>