Skip to content

Instantly share code, notes, and snippets.

@cfc1020
Created May 17, 2014 12:36
Show Gist options
  • Save cfc1020/3fb13e13db647268b2b3 to your computer and use it in GitHub Desktop.
Save cfc1020/3fb13e13db647268b2b3 to your computer and use it in GitHub Desktop.
My configure file is server-site nginx for unicorn
server {
listen 80;
server_name www.example.com;
root /home/user_name/web_app/public;
location / {
try_files $uri @unicorn;
}
location @unicorn {
proxy_pass http://unix:/home/user_name/web_app/tmp/sockets/unicorn.sock;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment