Skip to content

Instantly share code, notes, and snippets.

@mezbahalam
Created October 6, 2019 17:39
Show Gist options
  • Save mezbahalam/be2424e138838f5d2e1b402c2f5cd13e to your computer and use it in GitHub Desktop.
Save mezbahalam/be2424e138838f5d2e1b402c2f5cd13e to your computer and use it in GitHub Desktop.
@habib debug
upstream app {
# Path to Puma SOCK file, as defined previously
server unix:/home/deployer/fastfood/shared/tmp/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
root /home/deployer/fastfood/current/public;
location / {
try_files $uri/index.html $uri @app;
}
location @app {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_pass http://app;
}
location ~ ^/(assets|fonts|system)/|favicon.ico|robots.txt {
gzip_static on;
expires max;
add_header Cache-Control public;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment