diff options
-rw-r--r-- | config/httpd.conf | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/config/httpd.conf b/config/httpd.conf index d5a8a4866..b099ebb42 100644 --- a/config/httpd.conf +++ b/config/httpd.conf @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org # -# $Id: httpd.conf,v 1.18 2008-11-14 17:36:50 francis Exp $ +# $Id: httpd.conf,v 1.19 2008-11-17 12:52:31 francis Exp $ # This is needed for the PHP spell checker <Location /fcgi> @@ -15,8 +15,8 @@ </Location> RewriteEngine On -#RewriteLog /var/log/apache2/rewrite.log -#RewriteLogLevel 9 +RewriteLog /var/log/apache2/rewrite.log +RewriteLogLevel 9 # Make a file down.html in the DocumentRoot bring down the whole site and # display itself. @@ -41,16 +41,25 @@ RewriteCond %{DOCUMENT_ROOT}/down.html !-s RewriteRule /down.html / [R] # Use Mongrel as the main webserver (more reliable than FastCGI for Rails) -RewriteCond %{REQUEST_URI} !^/jslib/ -RewriteCond %{REQUEST_URI} !^/fcgi/ -RewriteCond %{REQUEST_URI} !^/files/ -RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f -RewriteRule ^/(.*) http://localhost:3000/$1 [P] -# This is roughly equivalent to ProxyPass, but lets Apache serve the static files. -# ProxyPass / http://localhost:3000/ -# This needs upgrading to configure a pack of mongrels (sigh): -# http://mongrel.rubyforge.org/wiki/MongrelCluster -# http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html +# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f +# RewriteRule ^/(.*) http://localhost:3000/$1 [P] +<Location /admin/balancer-manager> + SetHandler balancer-manager +</Location> + +<Proxy balancer://foicluster> +BalancerMember http://localhost:3000 +#BalancerMember http://localhost:3001 +# really should be lbmethod=bybusyness, but we don't have that algorithm yet. +# If it becomes a problem, upgrade or patch Apache with it. See: +# see http://labs.reevoo.com/2008/8/19/bybusy-mod-accepted-by-apache +ProxySet lbmethod=byrequests +</Proxy> +ProxyPass /jslib ! +ProxyPass /fcgi ! +ProxyPass /files ! +ProxyPass /admin/balancer-manager ! +ProxyPass / balancer://foicluster/ |