aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2008-04-17 09:25:01 +0000
committerfrancis <francis>2008-04-17 09:25:01 +0000
commit59736513a62a77fa7a9c80d5801671c26864ebb3 (patch)
tree49a7a96acd2540d8c1d8b6795a40d618b47b615c
parent1bf9d0eb9b3bed882c1146a5383dae5a84b77723 (diff)
Use mod_rewrite and [P] instead of ProxyPass, so static files, including
/jslib, are served by Apache
-rw-r--r--config/httpd.conf10
1 files changed, 7 insertions, 3 deletions
diff --git a/config/httpd.conf b/config/httpd.conf
index f0e2aa54e..da7159a09 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.6 2008-04-11 17:48:54 francis Exp $
+# $Id: httpd.conf,v 1.7 2008-04-17 09:25:01 francis Exp $
#DirectoryIndex index.cgi
@@ -22,8 +22,12 @@ RewriteRule /(.+).cgi /down.html [R]
RewriteCond %{DOCUMENT_ROOT}/down.html !-s
RewriteRule /down.html / [R]
-# Use mongrel
-ProxyPass / http://localhost:3000/
+# Use Mongrel as the main webserver (more reliable than FastCGI for Rails)
+RewriteCond %{REQUEST_URI} !^/jslib
+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/
# Pass through the HTTP basic authentication to mongrel
RewriteEngine On