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]
41 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
42 RewriteRule - - [E=OILS_OPAC_RID:%2]
43 RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}]
44 # ----------------------------------------------------------------------------------
46 # ----------------------------------------------------------------------------------
47 <LocationMatch /opac/>
48 AddType application/xhtml+xml .xml
50 # - configure mod_xmlent
52 XMLEntEscapeScript "no"
53 XMLEntStripComments "yes"
54 XMLEntContentType "text/html; charset=utf-8"
55 # forces quirks mode which we want for now
56 XMLEntStripDoctype "yes"
58 # - set up the include handlers
60 AddOutputFilter INCLUDES .xsl
61 AddOutputFilter INCLUDES;XMLENT .xml
63 # add languages as necessary
64 SetEnvIf Request_URI "/en-US/" locale=en-US
65 SetEnvIf Request_URI "/fr-CA/" locale=fr-CA
66 SetEnvIf Request_URI "/hy-AM/" locale=hy-AM
67 SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
69 # This gives you the option to configure a different host to serve OPAC images from
70 # Specify the hostname (withouth protocol) and path to the images. Protocol will
71 # be determined at runtime
72 #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
73 #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
74 #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
79 # ----------------------------------------------------------------------------------
80 # Force SSL on the OPAC's "My Account" page
81 # ----------------------------------------------------------------------------------
82 <LocationMatch .*/myopac.xml>
86 <LocationMatch /opac/extras/>
87 AddType application/xhtml+xml .xml
91 RewriteCond %{QUERY_STRING} locale=([^&]*)
92 RewriteRule ^/opac/[^/]+/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
93 <LocationMatch /opac/[^/]+/extras/slimpac/>
94 AddOutputFilter INCLUDES;XMLENT .html
97 # ----------------------------------------------------------------------------------
98 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
99 # ----------------------------------------------------------------------------------
101 SetEnvIfNoCase Accept-Language "en" locale=en-US
102 SetEnvIfNoCase Accept-Language "fr-CA" locale=fr-CA
103 SetEnvIfNoCase Accept-Language "hy-AM" locale=hy-AM
106 <LocationMatch /xul/.*\.xhtml$>
108 XMLEntEscapeScript "no"
109 XMLEntStripComments "yes"
111 XMLEntStripDoctype "yes"
112 XMLEntContentType "text/html; charset=utf-8"
113 AddOutputFilter INCLUDES;XMLENT .xhtml
118 <LocationMatch /xul/.*\.xul$>
120 XMLEntContentType "application/vnd.mozilla.xul+xml"
121 AddOutputFilter INCLUDES;XMLENT .xul
126 # ----------------------------------------------------------------------------------
128 # ----------------------------------------------------------------------------------
129 <Location /opac/extras/oisbn>
130 SetHandler perl-script
131 PerlHandler OpenILS::WWW::SuperCat::oisbn
136 <Location /opac/extras/supercat>
137 SetHandler perl-script
138 PerlHandler OpenILS::WWW::SuperCat::supercat
143 <Location /opac/extras/unapi>
144 SetHandler perl-script
145 PerlHandler OpenILS::WWW::SuperCat::unapi
150 <Location /opac/extras/feed/bookbag>
151 SetHandler perl-script
152 PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
157 <Location /opac/extras/opensearch>
158 SetHandler perl-script
159 PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
164 <Location /opac/extras/sru>
165 SetHandler perl-script
166 PerlHandler OpenILS::WWW::SuperCat::sru_search
171 <Location /opac/extras/feed/freshmeat>
172 SetHandler perl-script
173 PerlHandler OpenILS::WWW::SuperCat::changes_feed
178 <Location /opac/extras/browse>
179 SetHandler perl-script
180 PerlHandler OpenILS::WWW::SuperCat::string_browse
186 # ----------------------------------------------------------------------------------
187 # Module for processing staff-client offline scripts lives here
188 # ----------------------------------------------------------------------------------
189 <Directory "/openils/var/cgi-bin/offline">
190 AddHandler cgi-script .pl
197 # ----------------------------------------------------------------------------------
198 # XXX Note, it's important to explicitly set the JSON encoding style
199 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change
201 # ----------------------------------------------------------------------------------
202 # OpenSRF JSON legacy gateway
203 # ----------------------------------------------------------------------------------
205 SetHandler osrf_json_gateway_module
206 OSRFGatewayLegacyJSON "true"
209 # ----------------------------------------------------------------------------------
210 # New-style OpenSRF JSON gateway
211 # ----------------------------------------------------------------------------------
212 <Location /osrf-gateway-v1>
213 SetHandler osrf_json_gateway_module
214 OSRFGatewayLegacyJSON "false"
218 # ----------------------------------------------------------------------------------
219 # OpenSRF-over-HTTP translator
220 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
221 # ----------------------------------------------------------------------------------
222 <Location /osrf-http-translator>
223 SetHandler osrf_http_translator_module
227 # ----------------------------------------------------------------------------------
228 # The exporter lives here
229 # ----------------------------------------------------------------------------------
231 SetHandler perl-script
232 PerlSetVar OILSProxyTitle "Exporter Login"
233 PerlSetVar OILSProxyDescription "Please log in to export records"
234 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
235 PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
240 # ----------------------------------------------------------------------------------
241 # Reporting output lives here
242 # ----------------------------------------------------------------------------------
243 <Location /reporter/>
244 SetHandler perl-script
245 PerlSetVar OILSProxyTitle "Report Login"
246 PerlSetVar OILSProxyDescription "Please log in to view this report"
247 PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
248 PerlHandler OpenILS::WWW::Proxy
254 # ----------------------------------------------------------------------------------
255 # Selfcheck interface
256 # ----------------------------------------------------------------------------------
257 <LocationMatch .*/selfcheck.xml>
258 SetHandler perl-script
259 PerlSetVar OILSProxyTitle "Selfcheck Login"
260 PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface"
261 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
262 PerlHandler OpenILS::WWW::Proxy
269 # ----------------------------------------------------------------------------------
271 # ----------------------------------------------------------------------------------
272 <LocationMatch /reports/>
274 SetEnvIfNoCase Accept-Language "en" locale=en-US
275 SetEnvIfNoCase Accept-Language "fr-CA" locale=fr-CA
276 SetEnvIfNoCase Accept-Language "hy-AM" locale=hy-AM
277 XMLEntStripDoctype "yes"
278 XMLEntContentType "text/xml; charset=utf-8"
279 AddOutputFilter INCLUDES .xhtml
280 AddOutputFilter INCLUDES;XMLENT .xml
283 # ----------------------------------------------------------------------------------
285 # ----------------------------------------------------------------------------------
287 SetHandler perl-script
288 PerlHandler OpenILS::WWW::XMLRPCGateway
294 # ----------------------------------------------------------------------------------
295 # Conify - next-generation Evergreen administration interface
296 # ----------------------------------------------------------------------------------
298 RewriteRule ^/conify/.*/global/(.*)$ /conify/global/$1
301 XMLEntEscapeScript "no"
302 XMLEntStripComments "no"
303 XMLEntContentType "text/html; charset=utf-8"
304 AddOutputFilter INCLUDES .html
306 SetHandler perl-script
307 PerlSetVar OILSProxyTitle "Dojo Admin Login"
308 PerlSetVar OILSProxyDescription "Please log in to administer Evergreen"
309 PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
310 PerlHandler OpenILS::WWW::Proxy
316 # ----------------------------------------------------------------------------------
317 # Vandelay importers / exporters (your Web interface to bibliographic travel)
318 # ----------------------------------------------------------------------------------
319 # capture the locale from the URL
320 AliasMatch ^/vandelay/.*/vandelay.xml(.*) /openils/var/web/vandelay/vandelay.xml$1
324 SetEnvIf Request_URI "/en-US/" locale=en-US
325 SetEnvIf Request_URI "/fr-CA/" locale=fr-CA
327 XMLEntEscapeScript "no"
328 XMLEntStripComments "yes"
329 XMLEntContentType "text/html; charset=utf-8"
330 XMLEntStripDoctype "yes"
331 AddOutputFilter INCLUDES;XMLENT .xml
332 SetHandler perl-script
333 PerlSetVar OILSProxyTitle "Vandelay Login"
334 PerlSetVar OILSProxyDescription "Please log in to import MARC records"
335 PerlSetVar OILSProxyPermissions "IMPORT_MARC"
336 PerlHandler OpenILS::WWW::Proxy
341 <Location /vandelay-upload>
342 SetHandler perl-script
343 PerlHandler OpenILS::WWW::Vandelay::spool_marc
350 # OpenURL 0.1 searching based on OpenSearch
352 RewriteMap openurl prg:/openils/bin/openurl_map.pl
353 RewriteCond %{QUERY_STRING} (^.*$)
354 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]