rendered paste body<VirtualHost *:80>
ServerName www.conferenceer.com
ServerAlias www.www.conferenceer.com
DocumentRoot /var/www/apps/conferenceer/current/public
<Directory /var/www/apps/conferenceer/current/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Configure mongrel_cluster
<Proxy balancer://conferenceer_cluster>
BalancerMember http://127.0.0.1:8000
BalancerMember http://127.0.0.1:8001
BalancerMember http://127.0.0.1:8002
</Proxy>
RewriteEngine On
# Redirect requests not beginning w/conferencence prefix (2) to proper URL
RewriteCond %{REQUEST_URI} !^/2
RewriteRule ^/(.+) /2/$1
# Prevent access to .svn directories
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://conferenceer_cluster%{REQUEST_URI} [P,QSA,L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
ErrorLog logs/www.conferenceer.com-error_log
CustomLog logs/www.conferenceer.com-access_log combined
</VirtualHost>