Sha256: 5639306fe23040e354a90c76ae02f1628ab5500cd13763a1dff33248fdab9a0b

Contents?: true

Size: 1.21 KB

Versions: 75

Compression:

Stored size: 1.21 KB

Contents

<%
  @path = "/etc/nginx/rubber/unicorn_nginx.conf"
%>


upstream unicorn_server {
 # This is the socket we configured in unicorn.rb
 server unix:/var/run/unicorn.sock
 fail_timeout=0;
}

server {
  listen 80;
  client_max_body_size 4G;
  server_name <%= [ rubber_env.domain, rubber_env.web_aliases ].flatten.compact.join(" ") %>;

  keepalive_timeout 5;

  # Location of our static files
  root <%= Rubber.root + "/public" %>;

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

    # If you don't find the filename in the static files
    # Then request it from the unicorn server
    if (!-f $request_filename) {
      proxy_pass http://unicorn_server;
      break;
    }
  }

	# this rewrites all the requests to the maintenance.html
	# page if it exists in the doc root. This is for capistrano's
	# disable web task
	if (-f $document_root/system/maintenance.html)
	{
	  rewrite  ^(.*)$  /system/maintenance.html last;
	  break;
	}

	error_page   500 502 503 504  /500.html;
	location = /500.html
	{
	  root <%= Rubber.root + "/public" %>;
	}
	error_page 404  /404.html;
	location = /404.html
	{
	  root <%= Rubber.root + "/public" %>;
	}
}


Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
rubber-2.5.0 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.4.2 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.4.1 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.4.0 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.3.1 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.3.0 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.2.4 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.2.3 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.2.2 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.2.1 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.2.0 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.1.2 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.1.1 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.1.0 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.0.8 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.0.7 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.0.6 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.0.5 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.0.4 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf
rubber-2.0.3 templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf