Created
January 24, 2015 01:25
-
-
Save anonymous/b5b243bb6460f3012baf to your computer and use it in GitHub Desktop.
Apache configuration with mod_proxy
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
<VirtualHost *:80> | |
ServerAdmin user@example.org | |
DocumentRoot "/path/to/rails/application/public" | |
ServerName example.org | |
ServerAlias www.example.org | |
ErrorLog "/path/to/rails/application/log/apache-error.log" | |
CustomLog "/path/to/rails/application/log/apache-access.log" common | |
<Directory "/path/to/rails/application/public/"> | |
Options SymLinksIfOwnerMatch | |
AllowOverride None | |
Order allow,deny | |
Allow from All | |
</Directory> | |
<Proxy balancer://thinservers> | |
BalancerMember http://127.0.0.1:3000 | |
Allow from all | |
</Proxy> | |
ProxyRequests Off | |
ProxyPreserveHost Off | |
ProxyPass /assets/ ! | |
ProxyPass /uploads/ ! | |
ProxyPass /blog/ ! | |
ProxyPass / balancer://thinservers/ | |
ProxyPassReverse / balancer://thinservers/ | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment