]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
build/i18n/Makefile.in:
[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 # ----------------------------------------------------------------------------------
8 # Point / to the opac
9 # ----------------------------------------------------------------------------------
10 RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
11
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
17
18 # ----------------------------------------------------------------------------------
19 # Configure the gateway
20 # ----------------------------------------------------------------------------------
21 OSRFGatewayConfig /openils/conf/opensrf_core.xml
22
23 # ----------------------------------------------------------------------------------
24 # Added content plugin
25 # ----------------------------------------------------------------------------------
26 <Location /opac/extras/ac/>
27     SetHandler perl-script
28     PerlHandler OpenILS::WWW::AddedContent
29     Options +ExecCGI
30     PerlSendHeader On
31     allow from all
32 </Location>
33
34 # ----------------------------------------------------------------------------------
35 # Replace broken cover images with a transparent GIF by default
36 # ----------------------------------------------------------------------------------
37 RewriteEngine ON
38 RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
39     /opac/images/blank.png [P,L]
40         
41 # ----------------------------------------------------------------------------------
42 # Configure the OPAC
43 # ----------------------------------------------------------------------------------
44 <LocationMatch /opac/>
45     AddType application/xhtml+xml .xml
46    
47     # - configure mod_xmlent
48     XMLEntStripPI "yes"
49     XMLEntEscapeScript "no"
50     XMLEntStripComments "yes"
51     XMLEntContentType "text/html; charset=utf-8"
52     # forces quirks mode which we want for now
53     XMLEntStripDoctype "yes" 
54
55     # - set up the include handlers
56     Options +Includes
57     AddOutputFilter INCLUDES .xsl
58     AddOutputFilter INCLUDES;XMLENT .xml
59                     
60     # add languages as necessary
61     SetEnvIf Request_URI "/en-US/" locale=en-US
62     SetEnvIf Request_URI "/fr-CA/" locale=fr-CA
63     SetEnvIf Request_URI "/hy-AM/" locale=hy-AM
64     SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
65     
66     # This gives you the option to configure a different host to serve OPAC images from
67     # Specify the hostname (withouth protocol) and path to the images.  Protocol will
68     # be determined at runtime
69     #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
70     #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
71     #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
72
73 </LocationMatch>
74
75
76 # ----------------------------------------------------------------------------------
77 # Force SSL on the OPAC's "My Account" page
78 # ----------------------------------------------------------------------------------
79 <LocationMatch .*/myopac.xml>
80     SSLRequireSSL
81 </LocationMatch>
82
83 <LocationMatch /opac/extras/>
84     AddType application/xhtml+xml .xml
85 </LocationMatch>
86
87 <LocationMatch /opac/.*/extras/slimpac/>
88     AddOutputFilter INCLUDES;XMLENT .html
89 </LocationMatch>
90         
91 # ----------------------------------------------------------------------------------
92 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
93 # ----------------------------------------------------------------------------------
94 <LocationMatch /xul/.*\.xhtml$>
95     Options +Includes
96     XMLEntEscapeScript "no"
97     AddOutputFilter INCLUDES;XMLENT .xhtml
98     allow from all
99
100     # We only support one locale (en-US) for the time being
101     SetEnv locale en-US
102 </LocationMatch>
103
104 <LocationMatch /xul/.*\.xul$>
105     Options +Includes
106     XMLEntContentType "application/vnd.mozilla.xul+xml"
107     AddOutputFilter INCLUDES;XMLENT .xul
108     allow from all
109
110     # We only support one locale (en-US) for the time being
111     SetEnv locale en-US
112 </LocationMatch>
113
114
115 # ----------------------------------------------------------------------------------
116 # Supercat feeds
117 # ----------------------------------------------------------------------------------
118 <Location /opac/extras/oisbn>
119     SetHandler perl-script
120     PerlHandler OpenILS::WWW::SuperCat::oisbn
121     Options +ExecCGI
122     PerlSendHeader On
123     allow from all
124 </Location>
125 <Location /opac/extras/supercat>
126     SetHandler perl-script
127     PerlHandler OpenILS::WWW::SuperCat::supercat
128     Options +ExecCGI
129     PerlSendHeader On
130     allow from all
131 </Location>
132 <Location /opac/extras/unapi>
133     SetHandler perl-script
134     PerlHandler OpenILS::WWW::SuperCat::unapi
135     Options +ExecCGI
136     PerlSendHeader On
137     allow from all
138 </Location>
139 <Location /opac/extras/feed/bookbag>
140     SetHandler perl-script
141     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
142     Options +ExecCGI
143     PerlSendHeader On
144     allow from all
145 </Location>
146 <Location /opac/extras/opensearch>
147     SetHandler perl-script
148     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
149     Options +ExecCGI
150     PerlSendHeader On
151     allow from all
152 </Location>
153 <Location /opac/extras/sru>
154     SetHandler perl-script
155     PerlHandler OpenILS::WWW::SuperCat::sru_search
156     Options +ExecCGI
157     PerlSendHeader On
158     allow from all
159 </Location>
160 <Location /opac/extras/feed/freshmeat>
161     SetHandler perl-script
162     PerlHandler OpenILS::WWW::SuperCat::changes_feed
163     Options +ExecCGI
164     PerlSendHeader On
165     allow from all
166 </Location>
167 <Location /opac/extras/browse>
168     SetHandler perl-script
169     PerlHandler OpenILS::WWW::SuperCat::string_browse
170     Options +ExecCGI
171     PerlSendHeader On
172     allow from all
173 </Location>     
174         
175 # ----------------------------------------------------------------------------------
176 # Module for processing staff-client offline scripts lives here
177 # ----------------------------------------------------------------------------------
178 <Directory "/openils/var/cgi-bin/offline">
179     AddHandler cgi-script .pl
180     AllowOverride None
181     Options +ExecCGI
182     allow from all
183 </Directory>
184         
185         
186 # ----------------------------------------------------------------------------------
187 # XXX Note, it's important to explicitly set the JSON encoding style 
188 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
189 # with OpenSRF 1.0
190 # ----------------------------------------------------------------------------------
191 # OpenSRF JSON legacy gateway
192 # ----------------------------------------------------------------------------------
193 <Location /gateway>
194     SetHandler osrf_json_gateway_module
195     OSRFGatewayLegacyJSON "true"
196     allow from all
197 </Location>
198 # ----------------------------------------------------------------------------------
199 # New-style OpenSRF JSON gateway
200 # ----------------------------------------------------------------------------------
201 <Location /osrf-gateway-v1>
202     SetHandler osrf_json_gateway_module
203     OSRFGatewayLegacyJSON "false"
204     allow from all
205 </Location>
206
207 # ----------------------------------------------------------------------------------
208 # OpenSRF-over-HTTP translator
209 # (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
210 # ----------------------------------------------------------------------------------
211 <Location /osrf-http-translator>
212     SetHandler osrf_http_translator_module
213     allow from all
214 </Location>
215
216 # ----------------------------------------------------------------------------------
217 # The exporter lives here
218 # ----------------------------------------------------------------------------------
219 <Location /exporter>
220     SetHandler perl-script
221     PerlSetVar OILSProxyTitle "Exporter Login"
222     PerlSetVar OILSProxyDescription "Please log in to export records"
223     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
224     PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
225     Options +ExecCGI
226     allow from all
227 </Location>
228
229 # ----------------------------------------------------------------------------------
230 # Reporting output lives here
231 # ----------------------------------------------------------------------------------
232 <Location /reporter/>
233     SetHandler perl-script
234     PerlSetVar OILSProxyTitle "Report Login"
235     PerlSetVar OILSProxyDescription "Please log in to view this report"
236     PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
237     PerlHandler OpenILS::WWW::Proxy
238     Options +ExecCGI
239     PerlSendHeader On
240     allow from all
241 </Location>
242
243 # ----------------------------------------------------------------------------------
244 # Selfcheck interface
245 # ----------------------------------------------------------------------------------
246 <LocationMatch .*/selfcheck.xml>
247     SetHandler perl-script
248     PerlSetVar OILSProxyTitle "Selfcheck Login"
249     PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface"
250     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
251     PerlHandler OpenILS::WWW::Proxy
252     Options +ExecCGI
253     PerlSendHeader On
254     allow from all
255 </LocationMatch>
256
257
258 # ----------------------------------------------------------------------------------
259 # Reports GUI
260 # ----------------------------------------------------------------------------------
261 <LocationMatch /reports/>
262     Options +Includes
263         SetEnvIfNoCase Accept-Language "en" locale=en-US
264         SetEnvIfNoCase Accept-Language "fr-CA" locale=fr-CA
265         SetEnvIfNoCase Accept-Language "hy-AM" locale=hy-AM
266     AddOutputFilter INCLUDES .xhtml
267     AddOutputFilter INCLUDES;XMLENT .xml
268 </LocationMatch>
269
270 # ----------------------------------------------------------------------------------
271 # XML-RPC gateway
272 # ----------------------------------------------------------------------------------
273 <Location /xml-rpc>
274     SetHandler perl-script
275     PerlHandler OpenILS::WWW::XMLRPCGateway
276     Options +ExecCGI
277     PerlSendHeader On
278     allow from all
279 </Location>
280
281 # ----------------------------------------------------------------------------------
282 # Conify - next-generation Evergreen administration interface
283 # ----------------------------------------------------------------------------------
284 RewriteEngine on
285 RewriteRule ^/conify/.*/global/(.*)$ /conify/global/$1
286 <Location /conify>
287     XMLEntStripPI "yes"
288     XMLEntEscapeScript "no"
289     XMLEntStripComments "yes"
290     XMLEntContentType "text/html; charset=utf-8"
291     AddOutputFilter INCLUDES .html
292  
293     SetHandler perl-script
294     PerlSetVar OILSProxyTitle "Dojo Admin Login"
295     PerlSetVar OILSProxyDescription "Please log in to administer Evergreen"
296     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
297     PerlHandler OpenILS::WWW::Proxy
298     Options +ExecCGI
299     PerlSendHeader On
300     allow from all
301 </Location>
302
303 # ----------------------------------------------------------------------------------
304 # Vandelay importers / exporters (your Web interface to bibliographic travel)
305 # ----------------------------------------------------------------------------------
306 <Location /vandelay-upload>
307     SetHandler perl-script
308     PerlHandler OpenILS::WWW::Vandelay::spool_marc
309     Options +ExecCGI
310     allow from all
311 </Location>
312
313 # OpenURL 0.1 searching based on OpenSearch
314 RewriteEngine on
315 RewriteMap openurl prg:/openils/bin/openurl_map.pl
316 RewriteCond %{QUERY_STRING} (^.*$)
317 RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
318