server {
  listen 8080;
  server_name <%= @domain_names.join(' ') %>;
  root /u/apps/<%= @name %>/current/public;

  try_files $uri/index.html $uri.html $uri @app;

  location @app {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://<%= @name %>;
  }


  # passenger_enabled on;
  # passenger_min_instances 1;
}

upstream <%= @name %> {
  server unix:/u/apps/<%= @name %>/current/tmp/sockets/unicorn.sock;
}
server {
  listen 8080;
  server_name <%= @domain_names.join(' ') %>;
  root /u/apps/<%= @name %>/current/public;

  try_files $uri/index.html $uri.html $uri @app;

  location @app {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://<%= @name %>;
  }

}

upstream <%= @name %> {
  server unix:/u/apps/<%= @name %>/current/tmp/sockets/unicorn.sock;
}
Clean up old Passenger stuf from app_nginx
Clean up old Passenger stuf from app_nginx
