30 lines
617 B
Plaintext
30 lines
617 B
Plaintext
upstream parsley_app {
|
|
ip_hash;
|
|
server app;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
root /parsley/public;
|
|
|
|
location / {
|
|
try_files $uri @rails;
|
|
}
|
|
|
|
location ~ ^/(assets|packs)/ {
|
|
try_files $uri @rails;
|
|
gzip_static on;
|
|
expires 1y;
|
|
add_header Cache-Control public;
|
|
add_header ETag "";
|
|
break;
|
|
}
|
|
|
|
location @rails {
|
|
proxy_pass http://parsley_app;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
} |