upstream <%= application %> {
  server unix:/tmp/unicorn.sock fail_timeout=0;
}

server {
    listen 80 default_server;
    client_max_body_size 50m;
    server_name <%= server_name %>;

    keepalive_timeout 5;
    root <%= "#{deploy_to}/current/public" %>;
    try_files $uri @<%= application %>;

    location @<%= application %> {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://<%= application %>;
    }

    location ~ ^/(assets)/  {
        gzip_static on;
        expires max;
        add_header Cache-Control public;
    }

    error_page 500 502 504 /500.html;
    location = /500.html {
        root /home/ubuntu/vandal/current/public;
    }
}

upstream <%= application %> {
  server unix:/tmp/unicorn.sock fail_timeout=0;
}

server {
    listen 80 default_server;
    client_max_body_size 50m;
    server_name <%= server_name %>;

    keepalive_timeout 5;
    root <%= "#{deploy_to}/current/public" %>;
    try_files $uri @<%= application %>;

    location @<%= application %> {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://<%= application %>;
    }

    location ~ ^/(assets)/  {
        gzip_static on;
        expires max;
        add_header Cache-Control public;
    }

    error_page 500 502 504 /500.html;
    location = /500.html {
        root /home/ubuntu/<%= application %>/current/public;
    }
}

Remove hardcoded app name from Nginx vhost
Remove hardcoded app name from Nginx vhost

Fix #16
