adding SRU exmple stanza
[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
20 # ----------------------------------------------------------------------------------
21 # Configure the gateway
22 # ----------------------------------------------------------------------------------
23 OSRFGatewayConfig /openils/conf/opensrf_core.xml
24
25
26 # ----------------------------------------------------------------------------------
27 # Set up the book jackets URL
28 # XXX This pulls images from Amazon, don't use this in a production environment
29 # This is an example of how you can have bookjacket images via Apache redirect,
30 # if there is no full-fledged added content plugin for the site you want to 
31 # fetch images from.
32 # ----------------------------------------------------------------------------------
33 #RewriteEngine on
34 #ProxyTimeout 2
35 #RewriteRule /opac/extras/ac/jacket/small/(.*) \
36 #    http://images.amazon.com/images/P/$1.01._SCMZZZZZZZ_.jpg [P,L]
37 #RewriteRule /opac/extras/ac/jacket/large/(.*) \
38 #    http://images.amazon.com/images/P/$1.01._SCLZZZZZZZ_.jpg [P,L]
39
40 # ----------------------------------------------------------------------------------
41 # Added content plugin
42 # ----------------------------------------------------------------------------------
43 <Location /opac/extras/ac/>
44     SetHandler perl-script
45     PerlHandler OpenILS::WWW::AddedContent
46     Options +ExecCGI
47     PerlSendHeader On
48     allow from all
49 </Location>
50
51         
52 # ----------------------------------------------------------------------------------
53 # Configure the OPAC
54 # ----------------------------------------------------------------------------------
55 <LocationMatch /opac/>
56     AddType application/xhtml+xml .xml
57    
58     # - configure mod_xmlent
59     XMLEntStripPI "yes"
60     XMLEntEscapeScript "no"
61     XMLEntStripComments "yes"
62     XMLEntContentType "text/html; charset=utf-8"
63     # forces quirks mode which we want for now
64     XMLEntStripDoctype "yes" 
65
66     # - set up the include handlers
67     Options +Includes
68     AddOutputFilter INCLUDES .xsl
69     AddOutputFilter INCLUDES;XMLENT .xml
70                     
71     # add languages as necessary
72     SetEnvIf Request_URI "/en-US/" locale=en-US
73     SetEnvIf Request_URI "/fr-CA/" locale=fr-CA
74     SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
75     
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/
82
83 </LocationMatch>
84
85
86 # ----------------------------------------------------------------------------------
87 # Force SSL on the OPAC's "My Account" page
88 # ----------------------------------------------------------------------------------
89 <LocationMatch .*/myopac.xml>
90     SSLRequireSSL
91 </LocationMatch>
92
93 <LocationMatch /opac/extras/>
94     AddType application/xhtml+xml .xml
95 </LocationMatch>
96
97 <LocationMatch /opac/.*/extras/slimpac/>
98     AddOutputFilter INCLUDES;XMLENT .html
99 </LocationMatch>
100         
101 # ----------------------------------------------------------------------------------
102 # Run server-side XUL and XHTML through xmlent to load the correct XML entities
103 # ----------------------------------------------------------------------------------
104 <LocationMatch /xul/.*\.xhtml$>
105     Options +Includes
106     AddOutputFilter INCLUDES;XMLENT .xhtml
107     allow from all
108
109     # We only support one locale (en-US) for the time being
110     SetEnv locale en-US
111 </LocationMatch>
112
113 <LocationMatch /xul/.*\.xul$>
114     Options +Includes
115     XMLEntContentType "application/vnd.mozilla.xul+xml"
116     AddOutputFilter INCLUDES;XMLENT .xul
117     allow from all
118
119     # We only support one locale (en-US) for the time being
120     SetEnv locale en-US
121 </LocationMatch>
122
123
124 # ----------------------------------------------------------------------------------
125 # Supercat feeds
126 # ----------------------------------------------------------------------------------
127 <Location /opac/extras/oisbn>
128     SetHandler perl-script
129     PerlHandler OpenILS::WWW::SuperCat::oisbn
130     Options +ExecCGI
131     PerlSendHeader On
132     allow from all
133 </Location>
134 <Location /opac/extras/supercat>
135     SetHandler perl-script
136     PerlHandler OpenILS::WWW::SuperCat::supercat
137     Options +ExecCGI
138     PerlSendHeader On
139     allow from all
140 </Location>
141 <Location /opac/extras/unapi>
142     SetHandler perl-script
143     PerlHandler OpenILS::WWW::SuperCat::unapi
144     Options +ExecCGI
145     PerlSendHeader On
146     allow from all
147 </Location>
148 <Location /opac/extras/feed/bookbag>
149     SetHandler perl-script
150     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
151     Options +ExecCGI
152     PerlSendHeader On
153     allow from all
154 </Location>
155 <Location /opac/extras/opensearch>
156     SetHandler perl-script
157     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
158     Options +ExecCGI
159     PerlSendHeader On
160     allow from all
161 </Location>
162 <Location /opac/extras/sru>
163     SetHandler perl-script
164     PerlHandler OpenILS::WWW::SuperCat::sru_search
165     Options +ExecCGI
166     PerlSendHeader On
167     allow from all
168 </Location>
169 <Location /opac/extras/feed/freshmeat>
170     SetHandler perl-script
171     PerlHandler OpenILS::WWW::SuperCat::changes_feed
172     Options +ExecCGI
173     PerlSendHeader On
174     allow from all
175 </Location>
176 <Location /opac/extras/browse>
177     SetHandler perl-script
178     PerlHandler OpenILS::WWW::SuperCat::string_browse
179     Options +ExecCGI
180     PerlSendHeader On
181     allow from all
182 </Location>     
183         
184 # ----------------------------------------------------------------------------------
185 # Module for processing staff-client offline scripts lives here
186 # ----------------------------------------------------------------------------------
187 <Directory "/openils/var/cgi-bin/offline">
188     AddHandler cgi-script .pl
189     AllowOverride None
190     Options +ExecCGI
191     allow from all
192 </Directory>
193         
194         
195 # ----------------------------------------------------------------------------------
196 # XXX Note, it's important to explicitly set the JSON encoding style 
197 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
198 # with OpenSRF 1.0
199 # ----------------------------------------------------------------------------------
200 # OpenSRF JSON legacy gateway
201 # ----------------------------------------------------------------------------------
202 <Location /gateway>
203     SetHandler osrf_json_gateway_module
204     OSRFGatewayLegacyJSON "true"
205     allow from all
206 </Location>
207 # ----------------------------------------------------------------------------------
208 # New-style OpenSRF JSON gateway
209 # ----------------------------------------------------------------------------------
210 <Location /osrf-gateway-v1>
211     SetHandler osrf_json_gateway_module
212     OSRFGatewayLegacyJSON "false"
213     allow from all
214 </Location>
215
216         
217 # ----------------------------------------------------------------------------------
218 # The exporter lives here
219 # ----------------------------------------------------------------------------------
220 <Location /exporter>
221     SetHandler perl-script
222     PerlSetVar OILSProxyTitle "Exporter Login"
223     PerlSetVar OILSProxyDescription "Please log in to export records"
224     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
225     PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
226     Options +ExecCGI
227     allow from all
228 </Location>
229
230 # ----------------------------------------------------------------------------------
231 # Reporting output lives here
232 # ----------------------------------------------------------------------------------
233 <Location /reporter/>
234     SetHandler perl-script
235     PerlSetVar OILSProxyTitle "Report Login"
236     PerlSetVar OILSProxyDescription "Please log in to view this report"
237     PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
238     PerlHandler OpenILS::WWW::Proxy
239     Options +ExecCGI
240     PerlSendHeader On
241     allow from all
242 </Location>
243
244 # ----------------------------------------------------------------------------------
245 # Reports GUI
246 # ----------------------------------------------------------------------------------
247 <LocationMatch /reports/>
248     Options +Includes
249     AddOutputFilter INCLUDES .xhtml
250 </LocationMatch>
251
252 # ----------------------------------------------------------------------------------
253 # XML-RPC gateway
254 # ----------------------------------------------------------------------------------
255 <Location /xml-rpc>
256     SetHandler perl-script
257     PerlHandler OpenILS::WWW::XMLRPCGateway
258     Options +ExecCGI
259     PerlSendHeader On
260     allow from all
261 </Location>
262
263
264 # ----------------------------------------------------------------------------------
265 # Django admin interface (experimental)
266 #  - requires mod_python and django
267 #  - requires a symlink from WEBROOT/media to 
268 #  /usr/lib/python2.4/site-packages/django/contrib/admin/media/ (or similar)
269 # ----------------------------------------------------------------------------------
270 #<Location /ils_setup/>
271 #   Order deny,allow
272 #   Deny from all
273 #   Allow from 10.0.0.0/8
274 #   SetHandler mod_python
275 #   PythonHandler django.core.handlers.modpython
276 #   SetEnv DJANGO_SETTINGS_MODULE ils_admin.settings
277 #   PythonDebug On
278 #   PythonPath "['/openils/var/admin/', '/usr/lib/python2.4/site-packages/'] +sys.path"
279 #   PythonAutoReload On
280 #</Location>
281
282