]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
now that images are served as part of the added content plugin api,
[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     # The following environment variables are optional.  They specify
77     # alternate servers for various static data
78     # Added Content server
79     #SetEnvIf Request_URI ".*" OILS_OPAC_AC_HOST=static.example.org/opac/
80     # Static CSS files server
81     #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
82     # Static JavaScript files server
83     #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
84
85 </LocationMatch>
86
87
88 # ----------------------------------------------------------------------------------
89 # Force SSL on the OPAC's "My Account" page
90 # ----------------------------------------------------------------------------------
91 <LocationMatch .*/myopac.xml>
92     SSLRequireSSL
93 </LocationMatch>
94
95 <LocationMatch /opac/extras/>
96     AddType application/xhtml+xml .xml
97 </LocationMatch>
98
99 <LocationMatch /opac/.*/extras/slimpac/>
100     AddOutputFilter INCLUDES;XMLENT .html
101 </LocationMatch>
102         
103 # ----------------------------------------------------------------------------------
104 # Run server-side XUL through xmlent to load the correct XML entities
105 # ----------------------------------------------------------------------------------
106 <LocationMatch /xul/.*\.xul$>
107     Options +Includes
108     XMLEntContentType "application/vnd.mozilla.xul+xml"
109     AddOutputFilter INCLUDES;XMLENT .xul
110     allow from all
111
112     # We only support one locale (en-US) for the time being
113     SetEnv locale=en-US
114 </LocationMatch>
115
116 # ----------------------------------------------------------------------------------
117 # Supercat feeds
118 # ----------------------------------------------------------------------------------
119 <Location /opac/extras/oisbn>
120     SetHandler perl-script
121     PerlHandler OpenILS::WWW::SuperCat::oisbn
122     Options +ExecCGI
123     PerlSendHeader On
124     allow from all
125 </Location>
126 <Location /opac/extras/supercat>
127     SetHandler perl-script
128     PerlHandler OpenILS::WWW::SuperCat::supercat
129     Options +ExecCGI
130     PerlSendHeader On
131     allow from all
132 </Location>
133 <Location /opac/extras/unapi>
134     SetHandler perl-script
135     PerlHandler OpenILS::WWW::SuperCat::unapi
136     Options +ExecCGI
137     PerlSendHeader On
138     allow from all
139 </Location>
140 <Location /opac/extras/feed/bookbag>
141     SetHandler perl-script
142     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
143     Options +ExecCGI
144     PerlSendHeader On
145     allow from all
146 </Location>
147 <Location /opac/extras/opensearch>
148     SetHandler perl-script
149     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
150     Options +ExecCGI
151     PerlSendHeader On
152     allow from all
153 </Location>
154 <Location /opac/extras/feed/freshmeat>
155     SetHandler perl-script
156     PerlHandler OpenILS::WWW::SuperCat::changes_feed
157     Options +ExecCGI
158     PerlSendHeader On
159     allow from all
160 </Location>
161 <Location /opac/extras/browse>
162     SetHandler perl-script
163     PerlHandler OpenILS::WWW::SuperCat::string_browse
164     Options +ExecCGI
165     PerlSendHeader On
166     allow from all
167 </Location>     
168         
169 # ----------------------------------------------------------------------------------
170 # Module for processing staff-client offline scripts lives here
171 # ----------------------------------------------------------------------------------
172 <Directory "/openils/var/cgi-bin/offline">
173     AddHandler cgi-script .pl
174     AllowOverride None
175     Options +ExecCGI
176     allow from all
177 </Directory>
178         
179         
180 # ----------------------------------------------------------------------------------
181 # OpenSRF JSON gateway
182 # ----------------------------------------------------------------------------------
183 <Location /gateway>
184     SetHandler osrf_json_gateway_module
185     allow from all
186 </Location>
187
188         
189 # ----------------------------------------------------------------------------------
190 # The exporter lives here
191 # ----------------------------------------------------------------------------------
192 <Location /exporter>
193     SetHandler perl-script
194     PerlHandler OpenILS::WWW::Exporter
195     Options +ExecCGI
196     allow from all
197 </Location>
198
199 # ----------------------------------------------------------------------------------
200 # Reporting output lives here
201 # ----------------------------------------------------------------------------------
202 <Location /reporter/>
203     SetHandler perl-script
204     PerlSetVar ProxyTitle "Report Login"
205     PerlSetVar ProxyDescription "Please log in to view this report"
206     PerlSetVar ProxyPermissions "VIEW_REPORT_OUTPUT"
207     PerlHandler OpenILS::WWW::Proxy
208     Options +ExecCGI
209     PerlSendHeader On
210     allow from all
211 </Location>
212
213 # ----------------------------------------------------------------------------------
214 # Reports GUI
215 # ----------------------------------------------------------------------------------
216 <LocationMatch /reports/>
217     Options +Includes
218     AddOutputFilter INCLUDES .xhtml
219 </LocationMatch>
220
221 # ----------------------------------------------------------------------------------
222 # XML-RPC gateway
223 # ----------------------------------------------------------------------------------
224 <Location /xml-rpc>
225     SetHandler perl-script
226     PerlHandler OpenILS::WWW::XMLRPCGateway
227     Options +ExecCGI
228     PerlSendHeader On
229     allow from all
230 </Location>
231
232
233 # ----------------------------------------------------------------------------------
234 # Django admin interface (experimental)
235 #  - requires mod_python and django
236 #  - requires a symlink from WEBROOT/media to 
237 #  /usr/lib/python2.4/site-packages/django/contrib/admin/media/ (or similar)
238 # ----------------------------------------------------------------------------------
239 #<Location /ils_setup/>
240 #   Order deny,allow
241 #   Deny from all
242 #   Allow from 10.0.0.0/8
243 #   SetHandler mod_python
244 #   PythonHandler django.core.handlers.modpython
245 #   SetEnv DJANGO_SETTINGS_MODULE ils_admin.settings
246 #   PythonDebug On
247 #   PythonPath "['/openils/var/admin/', '/usr/lib/python2.4/site-packages/'] +sys.path"
248 #   PythonAutoReload On
249 #</Location>
250
251