anchor.diff:      proxy_connect_timeout     850000;
   
       # Pass to Faye
  -    proxy_pass http://<%= fetch(:application) %>-faye;
  +    proxy_pass http://<%= fetch(:application) %>-puma;
  +  }
  +
  +  location @rails {
  +    # Headers
  +    include /etc/nginx/proxy_params;
  +
  +    # Options
  +    proxy_redirect     off;
  +    proxy_read_timeout 300;
  +
  +    # Pass to Rails
  +    proxy_pass http://<%= fetch(:application) %>-puma;
  +  }
  +
  +  location @rails_nologs {
  +    # Headers
  +    include /etc/nginx/proxy_params;
  +
  +    # Options
  +    proxy_redirect     off;
  +    proxy_read_timeout 300;
  +
  +    # Disable logs
  +    access_log off;
  +
  +    # Pass to Rails
  +    proxy_pass http://<%= fetch(:application) %>-puma;
  +  }
  +
  +  location @maintenance {
  +    # Serve static assets if found.
  +    if (-f $request_filename) {
  +      break;
  +    }
  +
  +    # Set root to the shared directory.
  +    root <%= remote_path_for(shared_path) %>/public;
  +    rewrite ^(.*)$ /maintenance.html break;
     }
   }
  
positive.code:   error_log     <%= remote_path_for(shared_path) %>/log/nginx.error.log;
  
    ssl on;
    ssl_certificate       /etc/nginx/sites-admin/ssl-certificates/server.crt;
    ssl_certificate_key   /etc/nginx/sites-admin/ssl-certificates/server.key;
  
    location / {
      try_files $uri @deploy_it;
    }
  
    location @deploy_it {
      # Headers
      include /etc/nginx/proxy_params;
  
      # Options
      proxy_redirect     off;
      proxy_read_timeout 300;
  
      # Pass to Rails
      proxy_pass http://<%= fetch(:application) %>-puma;
    }
  
    location /faye {
      # Headers
      include /etc/nginx/proxy_params;
  
  
negative.code: upstream <%= fetch(:application) %>-puma {
    server unix:<%= remote_path_for(shared_path) %>/tmp/sockets/puma.sock fail_timeout=0;
  }
  
  <%- config = fetch(:nginx_vhost, {}) -%>
  