Skip to content

Instantly share code, notes, and snippets.

@drusepth
Created March 16, 2019 00:35
Show Gist options
  • Save drusepth/8db9231f86de87545d8afeb1e76d99fb to your computer and use it in GitHub Desktop.
Save drusepth/8db9231f86de87545d8afeb1e76d99fb to your computer and use it in GitHub Desktop.
upstream app {
# Path to Unicorn SOCK file, as defined previously
server unix:/home/ubuntu/listpump/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 0.0.0.0;
server_name localhost;
root /home/ubuntu/listpump/public;
try_files $uri/index.html $uri @app;
location @app {
proxy_pass http://app;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
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