Skip to content

Instantly share code, notes, and snippets.

@mokevnin
Created December 22, 2011 16:50
Show Gist options
  • Select an option

  • Save mokevnin/1510970 to your computer and use it in GitHub Desktop.

Select an option

Save mokevnin/1510970 to your computer and use it in GitHub Desktop.
upstream <%= @name %> {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
server unix:/u/apps/<%= @name %>/shared/.sock fail_timeout=0;
}
server {
server_name staging.club.kommersant.home;
root <%= @deploy_to %>/public;
try_files $uri @app;
location @app {
client_max_body_size 4G;
client_body_buffer_size 32k;
proxy_buffers 8 64k;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://knowledgestream;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment