Skip to content

Instantly share code, notes, and snippets.

@keokilee
Created March 25, 2015 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save keokilee/429f39d20d08a8f37f69 to your computer and use it in GitHub Desktop.
Save keokilee/429f39d20d08a8f37f69 to your computer and use it in GitHub Desktop.
Rails On Windows - HTTP VirtualHost
<VirtualHost _default_:80>
ServerName localhost
DocumentRoot “C:/<ruby stack>/projects/<project dir>/public”
<Directory “C:/<ruby stack>/projects/<project dir>/public”>
Allow from all
Options -MultiViews
Require all granted
</Directory>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://app_balancers%{REQUEST_URI} [P,QSA,L]
<Proxy balancer://app_balancers>
BalancerMember http://localhost:3000/
BalancerMember http://localhost:3001/
</Proxy>
<LocationMatch “^/assets/.*$”>
Header unset ETag
FileETag None
# RFC says only cache for 1 year
ExpiresActive On
ExpiresDefault “access plus 1 year”
</LocationMatch>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment