]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
Enable Zotero to access MODS representation of detailed records
[Evergreen.git] / Open-ILS / examples / apache / eg_vhost.conf
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 # ----------------------------------------------------------------------------------
5
6 # ----------------------------------------------------------------------------------
7 # Point / to the opac
8 # ----------------------------------------------------------------------------------
9 RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
10
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
16
17 # ----------------------------------------------------------------------------------
18 # Configure the gateway
19 # ----------------------------------------------------------------------------------
20 OSRFGatewayConfig /openils/conf/opensrf_core.xml
21
22 # ----------------------------------------------------------------------------------
23 # Added content plugin
24 # ----------------------------------------------------------------------------------
25 <Location /opac/extras/ac/>
26     SetHandler perl-script
27     PerlHandler OpenILS::WWW::AddedContent
28     Options +ExecCGI
29     PerlSendHeader On
30     allow from all
31 </Location>
32
33 # ----------------------------------------------------------------------------------
34 # Replace broken cover images with a transparent GIF by default
35 # ----------------------------------------------------------------------------------
36 RewriteEngine ON
37 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
38     /opac/images/blank.png [P,L]
39
40 RewriteEngine ON
41 RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
42 RewriteRule - - [E=OILS_OPAC_RID:%2]
43 RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}]
44 # ----------------------------------------------------------------------------------
45 # Configure the OPAC
46 # ----------------------------------------------------------------------------------
47 <LocationMatch /opac/>
48     AddType application/xhtml+xml .xml
49    
50     # - configure mod_xmlent
51     XMLEntStripPI "yes"
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" 
57
58     # - set up the include handlers
59     Options +Includes
60     AddOutputFilter INCLUDES .xsl
61     AddOutputFilter INCLUDES;XMLENT .xml
62                     
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/
68     
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/
75
76 </LocationMatch>
77
78
79 # ----------------------------------------------------------------------------------
80 # Force SSL on the OPAC's "My Account" page
81 # ----------------------------------------------------------------------------------
82 <LocationMatch .*/myopac.xml>
83     SSLRequireSSL
84 </LocationMatch>
85
86 <LocationMatch /opac/extras/>
87     AddType application/xhtml+xml .xml
88 </LocationMatch>
89
90 RewriteEngine ON
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
95 </LocationMatch>
96
97 # ----------------------------------------------------------------------------------
98 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
99 # ----------------------------------------------------------------------------------
100 <LocationMatch /xul>
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
104 </LocationMatch>
105
106 <LocationMatch /xul/.*\.xhtml$>
107     Options +Includes
108     XMLEntEscapeScript "no"
109     XMLEntStripComments "yes"
110     XMLEntStripPI "yes"
111     XMLEntStripDoctype "yes"
112     XMLEntContentType "text/html; charset=utf-8"
113     AddOutputFilter INCLUDES;XMLENT .xhtml
114     allow from all
115 </LocationMatch>
116
117
118 <LocationMatch /xul/.*\.xul$>
119     Options +Includes
120     XMLEntContentType "application/vnd.mozilla.xul+xml"
121     AddOutputFilter INCLUDES;XMLENT .xul
122     allow from all
123 </LocationMatch>
124
125
126 # ----------------------------------------------------------------------------------
127 # Supercat feeds
128 # ----------------------------------------------------------------------------------
129 <Location /opac/extras/oisbn>
130     SetHandler perl-script
131     PerlHandler OpenILS::WWW::SuperCat::oisbn
132     Options +ExecCGI
133     PerlSendHeader On
134     allow from all
135 </Location>
136 <Location /opac/extras/supercat>
137     SetHandler perl-script
138     PerlHandler OpenILS::WWW::SuperCat::supercat
139     Options +ExecCGI
140     PerlSendHeader On
141     allow from all
142 </Location>
143 <Location /opac/extras/unapi>
144     SetHandler perl-script
145     PerlHandler OpenILS::WWW::SuperCat::unapi
146     Options +ExecCGI
147     PerlSendHeader On
148     allow from all
149 </Location>
150 <Location /opac/extras/feed/bookbag>
151     SetHandler perl-script
152     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
153     Options +ExecCGI
154     PerlSendHeader On
155     allow from all
156 </Location>
157 <Location /opac/extras/opensearch>
158     SetHandler perl-script
159     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
160     Options +ExecCGI
161     PerlSendHeader On
162     allow from all
163 </Location>
164 <Location /opac/extras/sru>
165     SetHandler perl-script
166     PerlHandler OpenILS::WWW::SuperCat::sru_search
167     Options +ExecCGI
168     PerlSendHeader On
169     allow from all
170 </Location>
171 <Location /opac/extras/feed/freshmeat>
172     SetHandler perl-script
173     PerlHandler OpenILS::WWW::SuperCat::changes_feed
174     Options +ExecCGI
175     PerlSendHeader On
176     allow from all
177 </Location>
178 <Location /opac/extras/browse>
179     SetHandler perl-script
180     PerlHandler OpenILS::WWW::SuperCat::string_browse
181     Options +ExecCGI
182     PerlSendHeader On
183     allow from all
184 </Location>     
185         
186 # ----------------------------------------------------------------------------------
187 # Module for processing staff-client offline scripts lives here
188 # ----------------------------------------------------------------------------------
189 <Directory "/openils/var/cgi-bin/offline">
190     AddHandler cgi-script .pl
191     AllowOverride None
192     Options +ExecCGI
193     allow from all
194 </Directory>
195         
196         
197 # ----------------------------------------------------------------------------------
198 # XXX Note, it's important to explicitly set the JSON encoding style 
199 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
200 # with OpenSRF 1.0
201 # ----------------------------------------------------------------------------------
202 # OpenSRF JSON legacy gateway
203 # ----------------------------------------------------------------------------------
204 <Location /gateway>
205     SetHandler osrf_json_gateway_module
206     OSRFGatewayLegacyJSON "true"
207     allow from all
208 </Location>
209 # ----------------------------------------------------------------------------------
210 # New-style OpenSRF JSON gateway
211 # ----------------------------------------------------------------------------------
212 <Location /osrf-gateway-v1>
213     SetHandler osrf_json_gateway_module
214     OSRFGatewayLegacyJSON "false"
215     allow from all
216 </Location>
217
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
224     allow from all
225 </Location>
226
227 # ----------------------------------------------------------------------------------
228 # The exporter lives here
229 # ----------------------------------------------------------------------------------
230 <Location /exporter>
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
236     Options +ExecCGI
237     allow from all
238 </Location>
239
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
249     Options +ExecCGI
250     PerlSendHeader On
251     allow from all
252 </Location>
253
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
263     Options +ExecCGI
264     PerlSendHeader On
265     allow from all
266 </LocationMatch>
267
268
269 # ----------------------------------------------------------------------------------
270 # Reports GUI
271 # ----------------------------------------------------------------------------------
272 <LocationMatch /reports/>
273     Options +Includes
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
281 </LocationMatch>
282
283 # ----------------------------------------------------------------------------------
284 # XML-RPC gateway
285 # ----------------------------------------------------------------------------------
286 <Location /xml-rpc>
287     SetHandler perl-script
288     PerlHandler OpenILS::WWW::XMLRPCGateway
289     Options +ExecCGI
290     PerlSendHeader On
291     allow from all
292 </Location>
293
294 # ----------------------------------------------------------------------------------
295 # Conify - next-generation Evergreen administration interface
296 # ----------------------------------------------------------------------------------
297 RewriteEngine on
298 RewriteRule ^/conify/.*/global/(.*)$ /conify/global/$1
299 <Location /conify>
300     XMLEntStripPI "yes"
301     XMLEntEscapeScript "no"
302     XMLEntStripComments "yes"
303     XMLEntContentType "text/html; charset=utf-8"
304     AddOutputFilter INCLUDES .html
305  
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
311     Options +ExecCGI
312     PerlSendHeader On
313     allow from all
314 </Location>
315
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
321 <Location /vandelay>
322     RewriteEngine on
323     SetEnv locale en-US
324     SetEnvIf Request_URI "/en-US/" locale=en-US
325     SetEnvIf Request_URI "/fr-CA/" locale=fr-CA
326     XMLEntStripPI "yes"
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
337         Options +ExecCGI
338         PerlSendHeader On
339         allow from all
340 </Location>
341 <Location /vandelay-upload>
342     SetHandler perl-script
343     PerlHandler OpenILS::WWW::Vandelay::spool_marc
344     Options +ExecCGI
345     allow from all
346 </Location>
347
348
349
350 # OpenURL 0.1 searching based on OpenSearch
351 RewriteEngine on
352 RewriteMap openurl prg:/openils/bin/openurl_map.pl
353 RewriteCond %{QUERY_STRING} (^.*$)
354 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
355