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
23 # ----------------------------------------------------------------------------------
24 # Added content plugin
25 # ----------------------------------------------------------------------------------
26 <Location /opac/extras/ac/>
27 SetHandler perl-script
28 PerlHandler OpenILS::WWW::AddedContent
34 # ----------------------------------------------------------------------------------
35 # Replace broken cover images with a transparent GIF by default
36 # ----------------------------------------------------------------------------------
38 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
39 /opac/images/blank.png [P,L]
41 # ----------------------------------------------------------------------------------
42 # Add the row ID (RID) and date so we can make unAPI happy
43 # ----------------------------------------------------------------------------------
45 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
46 RewriteRule - - [E=OILS_OPAC_RID:%2]
47 RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}] [L]
49 # ----------------------------------------------------------------------------------
50 # Pull the locale from the URL
51 # ----------------------------------------------------------------------------------
53 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
54 RewriteRule - - [E=locale:%1] [L]
56 # ----------------------------------------------------------------------------------
58 # ----------------------------------------------------------------------------------
59 <LocationMatch /opac/>
60 AddType application/xhtml+xml .xml
62 # - configure mod_xmlent
64 XMLEntEscapeScript "no"
65 XMLEntStripComments "yes"
66 XMLEntContentType "text/html; charset=utf-8"
67 # forces quirks mode which we want for now
68 XMLEntStripDoctype "yes"
70 # - set up the include handlers
72 AddOutputFilter INCLUDES .xsl
73 AddOutputFilter INCLUDES;XMLENT .xml
75 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
77 # This gives you the option to configure a different host to serve OPAC images from
78 # Specify the hostname (withouth protocol) and path to the images. Protocol will
79 # be determined at runtime
80 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
81 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
82 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
87 # ----------------------------------------------------------------------------------
88 # Force SSL on the OPAC's "My Account" page
89 # ----------------------------------------------------------------------------------
90 <LocationMatch .*/myopac.xml>
94 <LocationMatch /opac/extras/>
95 # Force to en-US for now to satisfy bbags.xml
98 AddOutputFilter INCLUDES .xml
99 AddType application/xhtml+xml .xml
103 RewriteCond %{QUERY_STRING} locale=([^&]*)
104 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
105 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
106 AddOutputFilter INCLUDES;XMLENT .html
109 # ----------------------------------------------------------------------------------
110 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
111 # ----------------------------------------------------------------------------------
113 RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2})
114 RewriteRule ^/xul/ - [E=locale:%1]
115 RewriteRule ^/reports/ - [E=locale:%1] [L]
117 # Default to en-US if we haven't matched a locale of the form xx-YY
119 RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2})
120 RewriteRule ^/xul/ - [E=locale:en-US]
121 RewriteRule ^/reports/ - [E=locale:en-US] [L]
123 # Default to en-US if we are just given en
125 RewriteCond %{ENV:locale} ^$ [OR]
126 RewriteCond %{ENV:locale} ^en$
127 RewriteRule - - [E=locale:en-US] [L]
129 <LocationMatch /xul/.*\.x?html$>
131 XMLEntEscapeScript "no"
132 XMLEntStripComments "yes"
134 XMLEntStripDoctype "yes"
135 XMLEntContentType "text/html; charset=utf-8"
136 AddOutputFilter INCLUDES;XMLENT .xhtml
137 AddOutputFilter INCLUDES;XMLENT .html
142 <LocationMatch /xul/.*\.xul$>
144 XMLEntContentType "application/vnd.mozilla.xul+xml"
145 AddOutputFilter INCLUDES;XMLENT .xul
150 # ----------------------------------------------------------------------------------
152 # ----------------------------------------------------------------------------------
153 <Location /opac/extras/oisbn>
154 SetHandler perl-script
155 PerlHandler OpenILS::WWW::SuperCat::oisbn
160 <Location /opac/extras/supercat>
161 SetHandler perl-script
162 PerlHandler OpenILS::WWW::SuperCat::supercat
167 <Location /opac/extras/unapi>
168 SetHandler perl-script
169 PerlHandler OpenILS::WWW::SuperCat::unapi
174 <Location /opac/extras/feed/bookbag>
175 SetHandler perl-script
176 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
181 <Location /opac/extras/opensearch>
182 SetHandler perl-script
183 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
188 <Location /opac/extras/sru>
189 SetHandler perl-script
190 PerlHandler OpenILS::WWW::SuperCat::sru_search
195 <Location /opac/extras/feed/freshmeat>
196 SetHandler perl-script
197 PerlHandler OpenILS::WWW::SuperCat::changes_feed
202 <Location /opac/extras/browse>
203 SetHandler perl-script
204 PerlHandler OpenILS::WWW::SuperCat::string_browse
210 # ----------------------------------------------------------------------------------
211 # Module for displaying OpenSRF API documentation
212 # ----------------------------------------------------------------------------------
213 <Location /opac/extras/docgen.xsl>
214 AddOutputFilter INCLUDES .xsl
217 # ----------------------------------------------------------------------------------
218 # Module for processing staff-client offline scripts lives here
219 # ----------------------------------------------------------------------------------
220 <Directory "/openils/var/cgi-bin/offline">
221 AddHandler cgi-script .pl
228 # ----------------------------------------------------------------------------------
229 # XXX Note, it's important to explicitly set the JSON encoding style
230 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
232 # ----------------------------------------------------------------------------------
233 # OpenSRF JSON legacy gateway
234 # ----------------------------------------------------------------------------------
236 SetHandler osrf_json_gateway_module
237 OSRFGatewayLegacyJSON "true"
240 # ----------------------------------------------------------------------------------
241 # New-style OpenSRF JSON gateway
242 # ----------------------------------------------------------------------------------
243 <Location /osrf-gateway-v1>
244 SetHandler osrf_json_gateway_module
245 OSRFGatewayLegacyJSON "false"
249 # ----------------------------------------------------------------------------------
250 # OpenSRF-over-HTTP translator
251 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
252 # ----------------------------------------------------------------------------------
253 <Location /osrf-http-translator>
254 SetHandler osrf_http_translator_module
258 # ----------------------------------------------------------------------------------
259 # The exporter lives here
260 # ----------------------------------------------------------------------------------
262 SetHandler perl-script
263 PerlSetVar OILSProxyTitle "Exporter Login"
264 PerlSetVar OILSProxyDescription "Please log in to export records"
265 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
266 PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
271 # ----------------------------------------------------------------------------------
272 # Reporting output lives here
273 # ----------------------------------------------------------------------------------
274 <Location /reporter/>
275 SetHandler perl-script
276 PerlSetVar OILSProxyTitle "Report Login"
277 PerlSetVar OILSProxyDescription "Please log in to view this report"
278 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
279 PerlHandler OpenILS::WWW::Proxy
285 # ----------------------------------------------------------------------------------
286 # Selfcheck interface
287 # ----------------------------------------------------------------------------------
288 <LocationMatch .*/selfcheck.xml>
289 SetHandler perl-script
290 PerlSetVar OILSProxyTitle "Selfcheck Login"
291 PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface"
292 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
293 PerlHandler OpenILS::WWW::Proxy
300 # ----------------------------------------------------------------------------------
302 # ----------------------------------------------------------------------------------
303 <LocationMatch /reports>
305 AddOutputFilter INCLUDES;XMLENT .xhtml
307 <LocationMatch /reports/fm_IDL.xml>
309 XMLEntStripDoctype "yes"
310 XMLEntStripComments "no"
311 XMLEntContentType "text/xml; charset=utf-8"
312 AddOutputFilter INCLUDES;XMLENT .xml
315 # ----------------------------------------------------------------------------------
317 # ----------------------------------------------------------------------------------
319 SetHandler perl-script
320 PerlHandler OpenILS::WWW::XMLRPCGateway
326 # ----------------------------------------------------------------------------------
327 # Conify - next-generation Evergreen administration interface
328 # ----------------------------------------------------------------------------------
330 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
333 XMLEntEscapeScript "no"
334 XMLEntStripComments "no"
335 XMLEntContentType "text/html; charset=utf-8"
336 AddOutputFilter INCLUDES;XMLENT .html
338 SetHandler perl-script
339 PerlSetVar OILSProxyTitle "Dojo Admin Login"
340 PerlSetVar OILSProxyDescription "Please log in to administer Evergreen"
341 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
342 PerlHandler OpenILS::WWW::Proxy
348 # ----------------------------------------------------------------------------------
349 # Vandelay importers / exporters (your Web interface to bibliographic travel)
350 # ----------------------------------------------------------------------------------
351 RedirectMatch 301 ^/vandelay/vandelay.xml(.*)$ /vandelay/en-US/vandelay.xml$1
354 RewriteRule ^/vandelay/([a-z]{2}-[A-Z]{2})/(.*)$ /vandelay/$2 [E=locale:$1]
356 <LocationMatch /vandelay.*xml>
358 XMLEntEscapeScript "no"
359 XMLEntStripComments "yes"
360 XMLEntContentType "text/html; charset=utf-8"
361 XMLEntStripDoctype "yes"
362 AddOutputFilter INCLUDES;XMLENT .xml
363 SetHandler perl-script
364 PerlSetVar OILSProxyTitle "Vandelay Login"
365 PerlSetVar OILSProxyDescription "Please log in to import MARC records"
366 PerlSetVar OILSProxyPermissions "IMPORT_MARC"
367 PerlHandler OpenILS::WWW::Proxy
372 <Location /vandelay-upload>
373 SetHandler perl-script
374 PerlHandler OpenILS::WWW::Vandelay::spool_marc
379 # OpenURL 0.1 searching based on OpenSearch
381 RewriteMap openurl prg:/openils/bin/openurl_map.pl
382 RewriteCond %{QUERY_STRING} (^.*$)
383 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
387 # General Evergreen web template processor
389 SetHandler perl-script
390 PerlHandler OpenILS::WWW::EGWeb
395 # Note: the template processor will decline handling anything it does not
396 # have an explicit configuration for, which means it will fall back to
397 # Apache to serve the file. However, in the interest of speed, go ahead
398 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
399 # Add more exemptions as needed.
400 <LocationMatch ^/eg/.*(\.js|\.css|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>