Skip to content

Commit

Permalink
Adding application name to unicorn upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
cwsaylor committed Apr 2, 2012
1 parent 9ab3aa3 commit 099d80c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/cap_bootstrap/recipes/templates/nginx_unicorn.erb
@@ -1,4 +1,4 @@
upstream unicorn {
upstream unicorn_<%= application %> {
server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0;
}

Expand All @@ -17,12 +17,12 @@ server {
return 503;
}

try_files $uri/index.html $uri @unicorn;
location @unicorn {
try_files $uri/index.html $uri @unicorn_<%= application %>;
location @unicorn_<%= application %> {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
proxy_pass http://unicorn_<%= application %>;
}

error_page 503 @maintenance;
Expand Down

0 comments on commit 099d80c

Please sign in to comment.