]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
1c945bd020a44bb55740a2e00245c628b002f9d9
[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 through xmlent to load the correct XML entities
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 # Supercat feeds
116 # ----------------------------------------------------------------------------------
117 <Location /opac/extras/oisbn>
118     SetHandler perl-script
119     PerlHandler OpenILS::WWW::SuperCat::oisbn
120     Options +ExecCGI
121     PerlSendHeader On
122     allow from all
123 </Location>
124 <Location /opac/extras/supercat>
125     SetHandler perl-script
126     PerlHandler OpenILS::WWW::SuperCat::supercat
127     Options +ExecCGI
128     PerlSendHeader On
129     allow from all
130 </Location>
131 <Location /opac/extras/unapi>
132     SetHandler perl-script
133     PerlHandler OpenILS::WWW::SuperCat::unapi
134     Options +ExecCGI
135     PerlSendHeader On
136     allow from all
137 </Location>
138 <Location /opac/extras/feed/bookbag>
139     SetHandler perl-script
140     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
141     Options +ExecCGI
142     PerlSendHeader On
143     allow from all
144 </Location>
145 <Location /opac/extras/opensearch>
146     SetHandler perl-script
147     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
148     Options +ExecCGI
149     PerlSendHeader On
150     allow from all
151 </Location>
152 <Location /opac/extras/feed/freshmeat>
153     SetHandler perl-script
154     PerlHandler OpenILS::WWW::SuperCat::changes_feed
155     Options +ExecCGI
156     PerlSendHeader On
157     allow from all
158 </Location>
159 <Location /opac/extras/browse>
160     SetHandler perl-script
161     PerlHandler OpenILS::WWW::SuperCat::string_browse
162     Options +ExecCGI
163     PerlSendHeader On
164     allow from all
165 </Location>     
166         
167 # ----------------------------------------------------------------------------------
168 # Module for processing staff-client offline scripts lives here
169 # ----------------------------------------------------------------------------------
170 <Directory "/openils/var/cgi-bin/offline">
171     AddHandler cgi-script .pl
172     AllowOverride None
173     Options +ExecCGI
174     allow from all
175 </Directory>
176         
177         
178 # ----------------------------------------------------------------------------------
179 # XXX Note, it's important to explicitly set the JSON encoding style 
180 # (OSRFGatewayLegacyJSON), since the default encoding style will likely change 
181 # with OpenSRF 1.0
182 # ----------------------------------------------------------------------------------
183 # OpenSRF JSON legacy gateway
184 # ----------------------------------------------------------------------------------
185 <Location /gateway>
186     SetHandler osrf_json_gateway_module
187     OSRFGatewayLegacyJSON "true"
188     allow from all
189 </Location>
190 # ----------------------------------------------------------------------------------
191 # New-style OpenSRF JSON gateway
192 # ----------------------------------------------------------------------------------
193 <Location /osrf-gateway-v1>
194     SetHandler osrf_json_gateway_module
195     OSRFGatewayLegacyJSON "false"
196     allow from all
197 </Location>
198
199         
200 # ----------------------------------------------------------------------------------
201 # The exporter lives here
202 # ----------------------------------------------------------------------------------
203 <Location /exporter>
204     SetHandler perl-script
205     PerlHandler OpenILS::WWW::Exporter
206     Options +ExecCGI
207     allow from all
208 </Location>
209
210 # ----------------------------------------------------------------------------------
211 # Reporting output lives here
212 # ----------------------------------------------------------------------------------
213 <Location /reporter/>
214     SetHandler perl-script
215     PerlSetVar ProxyTitle "Report Login"
216     PerlSetVar ProxyDescription "Please log in to view this report"
217     PerlSetVar ProxyPermissions "VIEW_REPORT_OUTPUT"
218     PerlHandler OpenILS::WWW::Proxy
219     Options +ExecCGI
220     PerlSendHeader On
221     allow from all
222 </Location>
223
224 # ----------------------------------------------------------------------------------
225 # Reports GUI
226 # ----------------------------------------------------------------------------------
227 <LocationMatch /reports/>
228     Options +Includes
229     AddOutputFilter INCLUDES .xhtml
230 </LocationMatch>
231
232 # ----------------------------------------------------------------------------------
233 # XML-RPC gateway
234 # ----------------------------------------------------------------------------------
235 <Location /xml-rpc>
236     SetHandler perl-script
237     PerlHandler OpenILS::WWW::XMLRPCGateway
238     Options +ExecCGI
239     PerlSendHeader On
240     allow from all
241 </Location>
242
243
244 # ----------------------------------------------------------------------------------
245 # Django admin interface (experimental)
246 #  - requires mod_python and django
247 #  - requires a symlink from WEBROOT/media to 
248 #  /usr/lib/python2.4/site-packages/django/contrib/admin/media/ (or similar)
249 # ----------------------------------------------------------------------------------
250 #<Location /ils_setup/>
251 #   Order deny,allow
252 #   Deny from all
253 #   Allow from 10.0.0.0/8
254 #   SetHandler mod_python
255 #   PythonHandler django.core.handlers.modpython
256 #   SetEnv DJANGO_SETTINGS_MODULE ils_admin.settings
257 #   PythonDebug On
258 #   PythonPath "['/openils/var/admin/', '/usr/lib/python2.4/site-packages/'] +sys.path"
259 #   PythonAutoReload On
260 #</Location>
261
262