Sha256: cbfd78aba0cc9b49219fd9c4ffe385237eaca3edcf206a43a0e688789306b93d

Contents?: true

Size: 665 Bytes

Versions: 44

Compression:

Stored size: 665 Bytes

Contents

upstream <%= ENV['APP_NAME'] %> {
  server unix:/tmp/<%= ENV['APP_NAME'] %>_<%= ENV['RAILS_ENV'][0..2] %>.sock;
}

server {
  listen 80;
  server_name localhost;
  
  root <%= ENV['RAILS_ROOT'] %>/public;
  try_files $uri/index.html $uri @app;
  
  location @app {
    proxy_pass http://<%= ENV['APP_NAME'] %>;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

<% if ENV['RAILS_ENV'] == 'production' %>
  location ~ ^/(assets)/ {
    gzip_vary on;
    gzip_static on;
    expires 1y;
    add_header Cache-Control public;
    add_header ETag "";
  }
<% end -%>
}

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
daddy-0.2.22 lib/tasks/nginx.app.conf.erb
daddy-0.2.21 lib/tasks/nginx.app.conf.erb
daddy-0.2.20 lib/tasks/nginx.app.conf.erb
daddy-0.2.19 lib/tasks/nginx.app.conf.erb
daddy-0.2.18 lib/tasks/nginx.app.conf.erb
daddy-0.2.17 lib/tasks/nginx.app.conf.erb
daddy-0.2.16 lib/tasks/nginx.app.conf.erb
daddy-0.2.15 lib/tasks/nginx.app.conf.erb
daddy-0.2.14 lib/tasks/nginx.app.conf.erb
daddy-0.2.13 lib/tasks/nginx.app.conf.erb
daddy-0.2.12 lib/tasks/nginx.app.conf.erb
daddy-0.2.11 lib/tasks/nginx.app.conf.erb
daddy-0.2.10 lib/tasks/nginx.app.conf.erb
daddy-0.2.9 lib/tasks/nginx.app.conf.erb
daddy-0.2.8 lib/tasks/nginx.app.conf.erb
daddy-0.2.7 lib/tasks/nginx.app.conf.erb
daddy-0.2.6 lib/tasks/nginx.app.conf.erb
daddy-0.2.5 lib/tasks/nginx.app.conf.erb
daddy-0.2.4 lib/tasks/nginx.app.conf.erb
daddy-0.2.3 lib/tasks/nginx.app.conf.erb