Created
April 21, 2013 03:50
-
-
Save alanho/5428387 to your computer and use it in GitHub Desktop.
Rails with Apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerName www.example.com:80 | |
DocumentRoot "/path/to/rails/app/public" | |
RewriteEngine On | |
<Proxy balancer://railsapp> | |
BalancerMember http://127.0.0.1:5000 | |
BalancerMember http://127.0.0.1:5001 | |
</Proxy> | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://railsapp%{REQUEST_URI} [P,QSA,L] | |
<Directory /> | |
... | |
... | |
... | |
</Directory> | |
<Directory "/path/to/rails/app/public"> | |
Options -Indexes FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
# For SSL Site only | |
RequestHeader set X_FORWARDED_PROTO "https" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment