[d402d9]: etc / httpd.conf Maximize Restore History

Download this file

httpd.conf    44 lines (33 with data), 1.3 kB

##############################
# Cattrack additions to httpd.conf to set up a mongrel cluster
# (assumes typical Capistrano deploy of cattrack to /home/cattrack/cattrack)
##############################

<Proxy balancer://mongrel_cluster>
  BalancerMember http://127.0.0.1:8000
  BalancerMember http://127.0.0.1:8001
  BalancerMember http://127.0.0.1:8002
  BalancerMember http://127.0.0.1:8003
  BalancerMember http://127.0.0.1:8004
</Proxy>

<VirtualHost *:80>
    ServerName legato.watson.ibm.com
    DocumentRoot /home/cattrack/cattrack/current/public
	
    <Directory "/home/cattrack/cattrack/current/public">
	Options FollowSymLinks
	AllowOverride None
	Order allow,deny
	Allow from all
    </Directory>

    RewriteEngine on

    # 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://mongrel_cluster%{REQUEST_URI} [P,QSA,L]

</VirtualHost>