Skip to content

Instantly share code, notes, and snippets.

@ozgg
Last active December 21, 2015 04:18
Show Gist options
  • Select an option

  • Save ozgg/6248337 to your computer and use it in GitHub Desktop.

Select an option

Save ozgg/6248337 to your computer and use it in GitHub Desktop.
Nginx + puma
upstream site {
server unix:///var/www/example.com/shared/tmp/puma.sock;
}
server {
listen 80;
server_name example.com www.example.com;
root /var/www/example.com/current/public;
access_log /var/log/nginx/example.com/access.log main;
error_log /var/log/nginx/example.com/error.log info;
location / {
proxy_set_header Host $host;
if (!-f $request_filename) {
proxy_pass http://site;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment