diff options
-rw-r--r-- | config/vhost.conf | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/vhost.conf b/config/vhost.conf new file mode 100644 index 000000000..1317f02c0 --- /dev/null +++ b/config/vhost.conf @@ -0,0 +1,24 @@ +RewriteEngine On +RewriteLog /var/log/apache2/rewrite.log +RewriteLogLevel 3 + +# Make a file down.html in the DocumentRoot bring down the whole site and +# display itself. +RewriteCond %{DOCUMENT_ROOT}/down.html -s +RewriteRule /(.+).cgi /down.html [R] +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 %{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 +# sigh - doesn't work in apache 1.3 +#RewriteCond %{LA-U:REMOTE_USER} (.+) +#RewriteRule . - [E=RU:%1] +#RequestHeader add X-Forwarded-User %{RU}e |