I am currently using Apache to proxy to Thin (using this article)
None of my static assets work (e.g. stylesheets, javascripts). Is Apache supposed to be serving them or do I have to enable config.serve_static_assets
in config/environments/production.rb
? If Apache is supposed to serve them, then what am I probably doing wrong?
Here is my Apache config:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /home/r/public_html/example/public
RewriteEngine On
<Proxy balancer://thinservers>
BalancerMember http://127.0.0.1:5000
BalancerMember http://127.0.0.1:5001
BalancerMember http://127.0.0.1:5002
</Proxy>
# Redirect all non-static requests to thin
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]
ProxyPass / balancer://thinservers/
ProxyPassReverse / balancer://thinservers/
ProxyPreserveHost on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Custom log file locations
ErrorLog /home/r/public_html/example/log/error.log
CustomLog /home/r/public_html/example/log/access.log combined
</VirtualHost>