Skip to content

Instantly share code, notes, and snippets.

Created January 24, 2015 01:25
Show Gist options
  • Save anonymous/b5b243bb6460f3012baf to your computer and use it in GitHub Desktop.
Save anonymous/b5b243bb6460f3012baf to your computer and use it in GitHub Desktop.
Apache configuration with mod_proxy
<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