Sha256: 7a485883e3421d29ab4b0609a9529b47c6e20baf9b71e38554aded2efefe1c90

Contents?: true

Size: 1.44 KB

Versions: 146

Compression:

Stored size: 1.44 KB

Contents

upstream <%= application %> {
<% mongrel_servers.times do |counter| -%>
  <%= "server 127.0.0.1:#{mongrel_port+counter};"  %>
<% end -%>
}

server {
    listen       80;
    server_name  <%= domain %> <% 4.times do |counter| %> <%= domain.sub(/.*?\./, "assets#{counter}.") %><% end %>;
    root <%= deploy_to %>/current/public;
    access_log <%= deploy_to %>/shared/log/<%= domain %>-access.log;
    error_log <%= deploy_to %>/shared/log/<%= domain %>-error.log;
    client_max_body_size  <%= nginx_client_max_body_size %>;

        if (-f $document_root/system/maintenance.html){
                rewrite  ^(.*)$  /system/maintenance.html last;
                break;
        }
        location / {
                proxy_set_header  X-Real-IP  $remote_addr;
                proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_redirect false;

                if (-f $request_filename/index.html) {
                        rewrite (.*) $1/index.html break;
                }
                if (-f $request_filename.html) {
                        rewrite (.*) $1.html break;
                }       
                if (!-f $request_filename) {
                        proxy_pass http://<%= application %>;
                        break;
                }
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   html;
        }
}

Version data entries

146 entries across 144 versions & 5 rubygems

Version Path
le1t0-deprec-2.1.6.020 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.019 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.018 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.017 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.016 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.015 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.014 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.013 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.012 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.011 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.010 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.009 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.008 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.007 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.006 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.005 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.004 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.003 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.002 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
le1t0-deprec-2.1.6.001 lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb