Permalink
Browse files

Adding application name to unicorn upstream

  • Loading branch information...
1 parent 9ab3aa3 commit 099d80c8bf93cff4e08fcbdddff31d3bdeb156fd @cwsaylor cwsaylor committed Apr 2, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 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;
}
@@ -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;

0 comments on commit 099d80c

Please sign in to comment.