]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
Django admin is dead; alas, multi-db branch was never merged to Django core
[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     XMLEntEscapeScript "no"
107     AddOutputFilter INCLUDES;XMLENT .xhtml
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 <LocationMatch /xul/.*\.xul$>
115     Options +Includes
116     XMLEntContentType "application/vnd.mozilla.xul+xml"
117     AddOutputFilter INCLUDES;XMLENT .xul
118     allow from all
119
120     # We only support one locale (en-US) for the time being
121     SetEnv locale en-US
122 </LocationMatch>
123
124
125 # ----------------------------------------------------------------------------------
126 # Supercat feeds
127 # ----------------------------------------------------------------------------------
128 <Location /opac/extras/oisbn>
129     SetHandler perl-script
130     PerlHandler OpenILS::WWW::SuperCat::oisbn
131     Options +ExecCGI
132     PerlSendHeader On
133     allow from all
134 </Location>
135 <Location /opac/extras/supercat>
136     SetHandler perl-script
137     PerlHandler OpenILS::WWW::SuperCat::supercat
138     Options +ExecCGI
139     PerlSendHeader On
140     allow from all
141 </Location>
142 <Location /opac/extras/unapi>
143     SetHandler perl-script
144     PerlHandler OpenILS::WWW::SuperCat::unapi
145     Options +ExecCGI
146     PerlSendHeader On
147     allow from all
148 </Location>
149 <Location /opac/extras/feed/bookbag>
150     SetHandler perl-script
151     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
152     Options +ExecCGI
153     PerlSendHeader On
154     allow from all
155 </Location>
156 <Location /opac/extras/opensearch>
157     SetHandler perl-script
158     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
159     Options +ExecCGI
160     PerlSendHeader On
161     allow from all
162 </Location>
163 <Location /opac/extras/sru>
164     SetHandler perl-script
165     PerlHandler OpenILS::WWW::SuperCat::sru_search
166     Options +ExecCGI
167     PerlSendHeader On
168     allow from all
169 </Location>
170 <Location /opac/extras/feed/freshmeat>
171     SetHandler perl-script
172     PerlHandler OpenILS::WWW::SuperCat::changes_feed
173     Options +ExecCGI
174     PerlSendHeader On
175     allow from all
176 </Location>
177 <Location /opac/extras/browse>
178     SetHandler perl-script
179     PerlHandler OpenILS::WWW::SuperCat::string_browse
180     Options +ExecCGI
181     PerlSendHeader On
182     allow from all
183 </Location>     
184         
185 # ----------------------------------------------------------------------------------
186 # Module for processing staff-client offline scripts lives here
187 # ----------------------------------------------------------------------------------
188 <Directory "/openils/var/cgi-bin/offline">
189     AddHandler cgi-script .pl
190     AllowOverride None
191     Options +ExecCGI
192     allow from all
193 </Directory>
194         
195         
196 # ----------------------------------------------------------------------------------
197 # XXX Note, it's important to explicitly set the JSON encoding style 
198 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
199 # with OpenSRF 1.0
200 # ----------------------------------------------------------------------------------
201 # OpenSRF JSON legacy gateway
202 # ----------------------------------------------------------------------------------
203 <Location /gateway>
204     SetHandler osrf_json_gateway_module
205     OSRFGatewayLegacyJSON "true"
206     allow from all
207 </Location>
208 # ----------------------------------------------------------------------------------
209 # New-style OpenSRF JSON gateway
210 # ----------------------------------------------------------------------------------
211 <Location /osrf-gateway-v1>
212     SetHandler osrf_json_gateway_module
213     OSRFGatewayLegacyJSON "false"
214     allow from all
215 </Location>
216
217         
218 # ----------------------------------------------------------------------------------
219 # The exporter lives here
220 # ----------------------------------------------------------------------------------
221 <Location /exporter>
222     SetHandler perl-script
223     PerlSetVar OILSProxyTitle "Exporter Login"
224     PerlSetVar OILSProxyDescription "Please log in to export records"
225     PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
226     PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter
227     Options +ExecCGI
228     allow from all
229 </Location>
230
231 # ----------------------------------------------------------------------------------
232 # Reporting output lives here
233 # ----------------------------------------------------------------------------------
234 <Location /reporter/>
235     SetHandler perl-script
236     PerlSetVar OILSProxyTitle "Report Login"
237     PerlSetVar OILSProxyDescription "Please log in to view this report"
238     PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
239     PerlHandler OpenILS::WWW::Proxy
240     Options +ExecCGI
241     PerlSendHeader On
242     allow from all
243 </Location>
244
245 # ----------------------------------------------------------------------------------
246 # Reports GUI
247 # ----------------------------------------------------------------------------------
248 <LocationMatch /reports/>
249     Options +Includes
250     AddOutputFilter INCLUDES .xhtml
251 </LocationMatch>
252
253 # ----------------------------------------------------------------------------------
254 # XML-RPC gateway
255 # ----------------------------------------------------------------------------------
256 <Location /xml-rpc>
257     SetHandler perl-script
258     PerlHandler OpenILS::WWW::XMLRPCGateway
259     Options +ExecCGI
260     PerlSendHeader On
261     allow from all
262 </Location>
263