]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg_vhost.conf
adding vhost example for the generic; adding to example startup.pl (and removing...
[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 # ----------------------------------------------------------------------------------
30 RewriteEngine on
31 ProxyTimeout 2
32 RewriteRule /opac/extras/jacket/small/(.*) \
33     http://images.amazon.com/images/P/$1.01._SCMZZZZZZZ_.jpg [P,L]
34 RewriteRule /opac/extras/jacket/large/(.*) \
35     http://images.amazon.com/images/P/$1.01._SCLZZZZZZZ_.jpg [P,L]
36
37
38
39 # ----------------------------------------------------------------------------------
40 # Added content plugin
41 # ----------------------------------------------------------------------------------
42 <Location /opac/extras/ac/>
43     SetHandler perl-script
44     PerlHandler OpenILS::WWW::AddedContent
45     Options +ExecCGI
46     PerlSendHeader On
47     allow from all
48 </Location>
49
50         
51 # ----------------------------------------------------------------------------------
52 # Configure the OPAC
53 # ----------------------------------------------------------------------------------
54 <LocationMatch /opac/>
55     AddType application/xhtml+xml .xml
56    
57     # - configure mod_xmlent
58     XMLEntStripPI "yes"
59     XMLEntEscapeScript "no"
60     XMLEntStripComments "yes"
61     XMLEntContentType "text/html; charset=utf-8"
62     # forces quirks mode which we want for now
63     XMLEntStripDoctype "yes" 
64
65     # - set up the include handlers
66     Options +Includes
67     AddOutputFilter INCLUDES .xsl
68     AddOutputFilter INCLUDES;XMLENT .xml
69                     
70     # add languages as necessary
71     SetEnvIf Request_URI "/en-US/" locale=en-US
72     SetEnvIf Request_URI "/fr-CA/" locale=fr-CA
73     SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
74     
75     # This gives you the option to configure a different host to serve OPAC images from
76     # Specify the hostname (withouth protocol) and path to the images.  Protocol will
77     # be determined at runtime
78     #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
79     #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
80     #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
81
82 </LocationMatch>
83
84
85 # ----------------------------------------------------------------------------------
86 # Force SSL on the OPAC's "My Account" page
87 # ----------------------------------------------------------------------------------
88 <LocationMatch .*/myopac.xml>
89     SSLRequireSSL
90 </LocationMatch>
91
92 <LocationMatch /opac/extras/>
93     AddType application/xhtml+xml .xml
94 </LocationMatch>
95
96 <LocationMatch /opac/.*/extras/slimpac/>
97     AddOutputFilter INCLUDES;XMLENT .html
98 </LocationMatch>
99         
100 # ----------------------------------------------------------------------------------
101 # Run server-side XUL through xmlent to load the correct XML entities
102 # ----------------------------------------------------------------------------------
103 <LocationMatch /xul/.*\.xul$>
104     Options +Includes
105     XMLEntContentType "application/vnd.mozilla.xul+xml"
106     AddOutputFilter INCLUDES;XMLENT .xul
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 # ----------------------------------------------------------------------------------
114 # Supercat feeds
115 # ----------------------------------------------------------------------------------
116 <Location /opac/extras/oisbn>
117     SetHandler perl-script
118     PerlHandler OpenILS::WWW::SuperCat::oisbn
119     Options +ExecCGI
120     PerlSendHeader On
121     allow from all
122 </Location>
123 <Location /opac/extras/supercat>
124     SetHandler perl-script
125     PerlHandler OpenILS::WWW::SuperCat::supercat
126     Options +ExecCGI
127     PerlSendHeader On
128     allow from all
129 </Location>
130 <Location /opac/extras/unapi>
131     SetHandler perl-script
132     PerlHandler OpenILS::WWW::SuperCat::unapi
133     Options +ExecCGI
134     PerlSendHeader On
135     allow from all
136 </Location>
137 <Location /opac/extras/feed/bookbag>
138     SetHandler perl-script
139     PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
140     Options +ExecCGI
141     PerlSendHeader On
142     allow from all
143 </Location>
144 <Location /opac/extras/opensearch>
145     SetHandler perl-script
146     PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
147     Options +ExecCGI
148     PerlSendHeader On
149     allow from all
150 </Location>
151 <Location /opac/extras/feed/freshmeat>
152     SetHandler perl-script
153     PerlHandler OpenILS::WWW::SuperCat::changes_feed
154     Options +ExecCGI
155     PerlSendHeader On
156     allow from all
157 </Location>
158 <Location /opac/extras/browse>
159     SetHandler perl-script
160     PerlHandler OpenILS::WWW::SuperCat::string_browse
161     Options +ExecCGI
162     PerlSendHeader On
163     allow from all
164 </Location>     
165         
166 # ----------------------------------------------------------------------------------
167 # Module for processing staff-client offline scripts lives here
168 # ----------------------------------------------------------------------------------
169 <Directory "/openils/var/cgi-bin/offline">
170     AddHandler cgi-script .pl
171     AllowOverride None
172     Options +ExecCGI
173     allow from all
174 </Directory>
175         
176         
177 # ----------------------------------------------------------------------------------
178 # OpenSRF JSON gateway
179 # ----------------------------------------------------------------------------------
180 <Location /gateway>
181     SetHandler osrf_json_gateway_module
182     allow from all
183 </Location>
184
185         
186 # ----------------------------------------------------------------------------------
187 # The exporter lives here
188 # ----------------------------------------------------------------------------------
189 <Location /exporter>
190     SetHandler perl-script
191     PerlHandler OpenILS::WWW::Exporter
192     Options +ExecCGI
193     allow from all
194 </Location>
195
196 # ----------------------------------------------------------------------------------
197 # Reporting output lives here
198 # ----------------------------------------------------------------------------------
199 <Location /reporter/>
200     SetHandler perl-script
201     PerlSetVar ProxyTitle "Report Login"
202     PerlSetVar ProxyDescription "Please log in to view this report"
203     PerlSetVar ProxyPermissions "VIEW_REPORT_OUTPUT"
204     PerlHandler OpenILS::WWW::Proxy
205     Options +ExecCGI
206     PerlSendHeader On
207     allow from all
208 </Location>
209
210 # ----------------------------------------------------------------------------------
211 # Reports GUI
212 # ----------------------------------------------------------------------------------
213 <LocationMatch /reports/>
214     Options +Includes
215     AddOutputFilter INCLUDES .xhtml
216 </LocationMatch>
217
218 # ----------------------------------------------------------------------------------
219 # XML-RPC gateway
220 # ----------------------------------------------------------------------------------
221 <Location /xml-rpc>
222     SetHandler perl-script
223     PerlHandler OpenILS::WWW::XMLRPCGateway
224     Options +ExecCGI
225     PerlSendHeader On
226     allow from all
227 </Location>
228
229
230 # ----------------------------------------------------------------------------------
231 # Django admin interface (experimental)
232 #  - requires mod_python and django
233 #  - requires a symlink from WEBROOT/media to 
234 #  /usr/lib/python2.4/site-packages/django/contrib/admin/media/ (or similar)
235 # ----------------------------------------------------------------------------------
236 #<Location /ils_setup/>
237 #   Order deny,allow
238 #   Deny from all
239 #   Allow from 10.0.0.0/8
240 #   SetHandler mod_python
241 #   PythonHandler django.core.handlers.modpython
242 #   SetEnv DJANGO_SETTINGS_MODULE ils_admin.settings
243 #   PythonDebug On
244 #   PythonPath "['/openils/var/admin/', '/usr/lib/python2.4/site-packages/'] +sys.path"
245 #   PythonAutoReload On
246 #</Location>
247
248