# Remember to turn off ProxyRequests so you don't accidentally # create an open forward proxy! This is so easy to do that the generator # gives you no way to avoid it, if you want that, you're out of generator # territory. ProxyRequests Off # We want to re-write URLs with 'bad' < and > chars in the query # string (eg from EBSCO) to escape them. We use a perl script # that came with Umlaut to do that. RewriteEngine on RewriteMap query_escape prg:<%= destination_path('script/umlaut/rewrite_map.pl') %> #RewriteLock /var/lock/subsys/apache.rewrite.lock RewriteCond %{query_string} ^(.*[\>\<].*)$ RewriteRule ^(.*)$ $1?${query_escape:%1} [R,L,NE] # Define our mod_proxy_balancer cluster for all our mongrels. # Note: Do not put trailing / on these > <%- num_mongrels.times do |i| %> BalancerMember http://<%= ip %>:<%= start_port + i %> <%- end %> # Do NOT proxy static resources, have Apache serve them directly # with 'alias' directives later on. There might be a better more # complicated way to do this, see: http://mongrel.rubyforge.org/wiki/Apache ProxyPass <%= web_prefix%>/images ! ProxyPass <%= web_prefix%>/stylesheets ! ProxyPass <%= web_prefix%>/javascripts ! ProxyPass <%= web_prefix%>/local ! Alias <%= web_prefix%>/images <%= destination_path('public/images') %> Alias <%= web_prefix%>/stylesheets <%= destination_path('public/stylesheets') %> Alias <%= web_prefix%>/javascripts <%= destination_path('public/javascripts') %> Alias <%= web_prefix%>/local <%= destination_path('public/local') %> # Proxy requests to umlaut's path to the mongrels. ProxyPass <%= web_prefix %> balancer://umlaut_cluster_<%= start_port %><%= web_prefix %> ProxyPassReverse <%= web_prefix %> balancer://umlaut_cluster_<%= start_port %><%= web_prefix %> ProxyPreserveHost on