Sha256: 033f9e28482eabab5bc45d48cae58a4548f63fbbd0bc64153b6018ec078060d8

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

upstream unicorn_<%= fetch(:nginx_config_name) %> {
<% if fetch(:unicorn_use_tcp) -%>
  <% roles(:app).each do |role| -%>
    server <%= role.hostname %>:<%= fetch(:unicorn_tcp_listen_port)%> fail_timeout=<%= fetch(:nginx_fail_timeout) %>;
  <% end -%>
<% else -%>
  server unix:/tmp/unicorn.<%= fetch(:nginx_config_name) %>.sock fail_timeout=<%= fetch(:nginx_fail_timeout) %>;
<% end -%>
}

<% if fetch(:nginx_use_ssl) -%>
server {
  listen <%= fetch(:nginx_server_port) %>;
  server_name <%= fetch(:nginx_server_name) %>;
  rewrite ^(.*) https://$host$1 permanent;
}
<% end -%>

<% # render the default server directive. If SSL is enabled, port 443 is used %>
<%= template_to_s("_default_server_directive.erb", ssl_port: 443, nginx_pass_ssl_client_cert: false).to_s %>

<% if fetch(:nginx_pass_ssl_client_cert) -%>
<% # render the server directive with SSL client certificate authentication enabled on port 444 %>
<%= template_to_s("_default_server_directive.erb", ssl_port: 444, nginx_pass_ssl_client_cert: true).to_s %>
<% end -%>

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
capistrano-unicorn-nginx-4.1.0 lib/generators/capistrano/unicorn_nginx/templates/nginx_conf.erb
capistrano-unicorn-nginx-4.0.0 lib/generators/capistrano/unicorn_nginx/templates/nginx_conf.erb
capistrano-unicorn-nginx-osx-3.4.0.4 lib/generators/capistrano/unicorn_nginx_osx/templates/nginx_conf.erb
capistrano-unicorn-nginx-osx-3.4.0.3 lib/generators/capistrano/unicorn_nginx_osx/templates/nginx_conf.erb
capistrano-unicorn-nginx-osx-3.4.0.2 lib/generators/capistrano/unicorn_nginx_osx/templates/nginx_conf.erb
capistrano-unicorn-nginx-osx-3.4.0.1 lib/generators/capistrano/unicorn_nginx_osx/templates/nginx_conf.erb