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 # ----------------------------------------------------------------------------------
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
22 # ----------------------------------------------------------------------------------
23 # Added content plugin
24 # ----------------------------------------------------------------------------------
25 <Location /opac/extras/ac/>
26 SetHandler perl-script
27 PerlHandler OpenILS::WWW::AddedContent
33 # ----------------------------------------------------------------------------------
34 # Replace broken cover images with a transparent GIF by default
35 # ----------------------------------------------------------------------------------
37 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
38 /opac/images/blank.png [P,L]
40 # ----------------------------------------------------------------------------------
41 # Add the row ID (RID) and date so we can make unAPI happy
42 # ----------------------------------------------------------------------------------
44 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
45 RewriteRule - - [E=OILS_OPAC_RID:%2]
46 RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}] [L]
48 # ----------------------------------------------------------------------------------
49 # Pull the locale from the URL
50 # ----------------------------------------------------------------------------------
52 RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
53 RewriteRule - - [E=locale:%1] [L]
55 # ----------------------------------------------------------------------------------
57 # ----------------------------------------------------------------------------------
58 <LocationMatch /opac/>
59 AddType application/xhtml+xml .xml
61 # - configure mod_xmlent
63 XMLEntEscapeScript "no"
64 XMLEntStripComments "yes"
65 XMLEntContentType "text/html; charset=utf-8"
66 # forces quirks mode which we want for now
67 XMLEntStripDoctype "yes"
69 # - set up the include handlers
71 AddOutputFilter INCLUDES .xsl
72 AddOutputFilter INCLUDES;XMLENT .xml
74 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
76 # This gives you the option to configure a different host to serve OPAC images from
77 # Specify the hostname (withouth protocol) and path to the images. Protocol will
78 # be determined at runtime
79 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
80 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
81 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
86 # ----------------------------------------------------------------------------------
87 # Force SSL on the OPAC's "My Account" page
88 # ----------------------------------------------------------------------------------
89 <LocationMatch .*/myopac.xml>
93 <LocationMatch /opac/extras/>
94 AddType application/xhtml+xml .xml
98 RewriteCond %{QUERY_STRING} locale=([^&]*)
99 RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
100 <LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
101 AddOutputFilter INCLUDES;XMLENT .html
104 # ----------------------------------------------------------------------------------
105 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
106 # ----------------------------------------------------------------------------------
108 RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2})
109 RewriteRule ^/xul/ - [E=locale:%1]
110 RewriteRule ^/reports/ - [E=locale:%1] [L]
112 # Default to en-US if we haven't matched a locale of the form xx-YY
114 RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2})
115 RewriteRule ^/xul/ - [E=locale:en-US]
116 RewriteRule ^/reports/ - [E=locale:en-US] [L]
118 # Default to en-US if we are just given en
120 RewriteCond %{ENV:locale} ^$ [OR]
121 RewriteCond %{ENV:locale} ^en$
122 RewriteRule - - [E=locale:en-US] [L]
124 <LocationMatch /xul/.*\.xhtml$>
126 XMLEntEscapeScript "no"
127 XMLEntStripComments "yes"
129 XMLEntStripDoctype "yes"
130 XMLEntContentType "text/html; charset=utf-8"
131 AddOutputFilter INCLUDES;XMLENT .xhtml
136 <LocationMatch /xul/.*\.xul$>
138 XMLEntContentType "application/vnd.mozilla.xul+xml"
139 AddOutputFilter INCLUDES;XMLENT .xul
144 # ----------------------------------------------------------------------------------
146 # ----------------------------------------------------------------------------------
147 <Location /opac/extras/oisbn>
148 SetHandler perl-script
149 PerlHandler OpenILS::WWW::SuperCat::oisbn
154 <Location /opac/extras/supercat>
155 SetHandler perl-script
156 PerlHandler OpenILS::WWW::SuperCat::supercat
161 <Location /opac/extras/unapi>
162 SetHandler perl-script
163 PerlHandler OpenILS::WWW::SuperCat::unapi
168 <Location /opac/extras/feed/bookbag>
169 SetHandler perl-script
170 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
175 <Location /opac/extras/opensearch>
176 SetHandler perl-script
177 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
182 <Location /opac/extras/sru>
183 SetHandler perl-script
184 PerlHandler OpenILS::WWW::SuperCat::sru_search
189 <Location /opac/extras/feed/freshmeat>
190 SetHandler perl-script
191 PerlHandler OpenILS::WWW::SuperCat::changes_feed
196 <Location /opac/extras/browse>
197 SetHandler perl-script
198 PerlHandler OpenILS::WWW::SuperCat::string_browse
204 # ----------------------------------------------------------------------------------
205 # Module for processing staff-client offline scripts lives here
206 # ----------------------------------------------------------------------------------
207 <Directory "/openils/var/cgi-bin/offline">
208 AddHandler cgi-script .pl
215 # ----------------------------------------------------------------------------------
216 # XXX Note, it's important to explicitly set the JSON encoding style
217 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
219 # ----------------------------------------------------------------------------------
220 # OpenSRF JSON legacy gateway
221 # ----------------------------------------------------------------------------------
223 SetHandler osrf_json_gateway_module
224 OSRFGatewayLegacyJSON "true"
227 # ----------------------------------------------------------------------------------
228 # New-style OpenSRF JSON gateway
229 # ----------------------------------------------------------------------------------
230 <Location /osrf-gateway-v1>
231 SetHandler osrf_json_gateway_module
232 OSRFGatewayLegacyJSON "false"
236 # ----------------------------------------------------------------------------------
237 # OpenSRF-over-HTTP translator
238 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
239 # ----------------------------------------------------------------------------------
240 <Location /osrf-http-translator>
241 SetHandler osrf_http_translator_module
245 # ----------------------------------------------------------------------------------
246 # The exporter lives here
247 # ----------------------------------------------------------------------------------
249 SetHandler perl-script
250 PerlSetVar OILSProxyTitle "Exporter Login"
251 PerlSetVar OILSProxyDescription "Please log in to export records"
252 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
253 PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
258 # ----------------------------------------------------------------------------------
259 # Reporting output lives here
260 # ----------------------------------------------------------------------------------
261 <Location /reporter/>
262 SetHandler perl-script
263 PerlSetVar OILSProxyTitle "Report Login"
264 PerlSetVar OILSProxyDescription "Please log in to view this report"
265 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
266 PerlHandler OpenILS::WWW::Proxy
272 # ----------------------------------------------------------------------------------
273 # Selfcheck interface
274 # ----------------------------------------------------------------------------------
275 <LocationMatch .*/selfcheck.xml>
276 SetHandler perl-script
277 PerlSetVar OILSProxyTitle "Selfcheck Login"
278 PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface"
279 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
280 PerlHandler OpenILS::WWW::Proxy
287 # ----------------------------------------------------------------------------------
289 # ----------------------------------------------------------------------------------
290 <LocationMatch /reports>
292 AddOutputFilter INCLUDES;XMLENT .xhtml
294 <LocationMatch /reports/fm_IDL.xml>
296 XMLEntStripDoctype "yes"
297 XMLEntStripComments "no"
298 XMLEntContentType "text/xml; charset=utf-8"
299 AddOutputFilter INCLUDES;XMLENT .xml
302 # ----------------------------------------------------------------------------------
304 # ----------------------------------------------------------------------------------
306 SetHandler perl-script
307 PerlHandler OpenILS::WWW::XMLRPCGateway
313 # ----------------------------------------------------------------------------------
314 # Conify - next-generation Evergreen administration interface
315 # ----------------------------------------------------------------------------------
317 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
320 XMLEntEscapeScript "no"
321 XMLEntStripComments "no"
322 XMLEntContentType "text/html; charset=utf-8"
323 AddOutputFilter INCLUDES;XMLENT .html
325 SetHandler perl-script
326 PerlSetVar OILSProxyTitle "Dojo Admin Login"
327 PerlSetVar OILSProxyDescription "Please log in to administer Evergreen"
328 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
329 PerlHandler OpenILS::WWW::Proxy
335 # ----------------------------------------------------------------------------------
336 # Vandelay importers / exporters (your Web interface to bibliographic travel)
337 # ----------------------------------------------------------------------------------
338 RedirectMatch 301 ^/vandelay/vandelay.xml(.*)$ /vandelay/en-US/vandelay.xml$1
341 RewriteRule ^/vandelay/([a-z]{2}-[A-Z]{2})/(.*)$ /vandelay/$2 [E=locale:$1]
343 <LocationMatch /vandelay.*xml>
345 XMLEntEscapeScript "no"
346 XMLEntStripComments "yes"
347 XMLEntContentType "text/html; charset=utf-8"
348 XMLEntStripDoctype "yes"
349 AddOutputFilter INCLUDES;XMLENT .xml
350 SetHandler perl-script
351 PerlSetVar OILSProxyTitle "Vandelay Login"
352 PerlSetVar OILSProxyDescription "Please log in to import MARC records"
353 PerlSetVar OILSProxyPermissions "IMPORT_MARC"
354 PerlHandler OpenILS::WWW::Proxy
359 <Location /vandelay-upload>
360 SetHandler perl-script
361 PerlHandler OpenILS::WWW::Vandelay::spool_marc
366 # OpenURL 0.1 searching based on OpenSearch
368 RewriteMap openurl prg:/openils/bin/openurl_map.pl
369 RewriteCond %{QUERY_STRING} (^.*$)
370 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
374 # General Evergreen web template processor
376 SetHandler perl-script
377 PerlHandler OpenILS::WWW::EGWeb
382 # Note: the template processor will decline handling anything it does not
383 # have an explicit configuration for, which means it will fall back to
384 # Apache to serve the file. However, in the interest of speed, go ahead
385 # and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
386 # Add more exemptions as needed.
387 <LocationMatch ^/eg/.*(\.js|\.css|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>