Skip to content

Instantly share code, notes, and snippets.

@kirill-fedyanin
Created March 7, 2017 17:06
Show Gist options
  • Save kirill-fedyanin/b00097c8633cbbaaaf6472bc6317f93f to your computer and use it in GitHub Desktop.
Save kirill-fedyanin/b00097c8633cbbaaaf6472bc6317f93f to your computer and use it in GitHub Desktop.
upstream puma {
server unix:///home/ct_cyrill/apps/sendit/tmp/sockets/puma.sock;
}
server {
listen 80 default_server deferred;
server_name localhost;
root /home/ct_cyrill/apps/sendit/public;
access_log /home/ct_cyrill/apps/sendit/log/nginx.access.log;
error_log /home/ct_cyrill/apps/sendit/log/nginx.error.log info;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment