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.3.19 lib/tasks/nginx.app.conf.erb
daddy-0.3.18 lib/tasks/nginx.app.conf.erb
daddy-0.3.17 lib/tasks/nginx.app.conf.erb
daddy-0.3.16 lib/tasks/nginx.app.conf.erb
daddy-0.3.15 lib/tasks/nginx.app.conf.erb
daddy-0.3.14 lib/tasks/nginx.app.conf.erb
daddy-0.3.13 lib/tasks/nginx.app.conf.erb
daddy-0.3.12 lib/tasks/nginx.app.conf.erb
daddy-0.3.11 lib/tasks/nginx.app.conf.erb
daddy-0.3.10 lib/tasks/nginx.app.conf.erb
daddy-0.3.9 lib/tasks/nginx.app.conf.erb
daddy-0.3.8 lib/tasks/nginx.app.conf.erb
daddy-0.3.7 lib/tasks/nginx.app.conf.erb
daddy-0.3.6 lib/tasks/nginx.app.conf.erb
daddy-0.3.4 lib/tasks/nginx.app.conf.erb
daddy-0.3.3 lib/tasks/nginx.app.conf.erb
daddy-0.3.2 lib/tasks/nginx.app.conf.erb
daddy-0.3.1 lib/tasks/nginx.app.conf.erb
daddy-0.3.0 lib/tasks/nginx.app.conf.erb
daddy-0.2.23 lib/tasks/nginx.app.conf.erb