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