site.conf
server {
listen 80;
# Properly serve assets
location ~ ^/(assets)/ {
root /usr/share/nginx/html;
gzip_static on;
expires max;
add_header Cache-Control public;
add_header ETag "";
}
# Proxy requests to rails app
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
proxy_pass http://prod_app:3000;
}
}