Sha256: f9ff1098edcb78f32c5109e67b26a18d9920416261030c167e840afca6f77bda

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

<%-
  @letsencrypt = system("sudo test -e /etc/letsencrypt/live/#{@server_name}/fullchain.pem")
  @selfsigned = system('sudo test -e /etc/pki/tls/certs/localhost.crt')
  @ssl = @letsencrypt || @selfsigned
-%>
server {
  listen 80;
<%- if @ssl -%>
  listen 443 ssl;
<%- end -%>
  server_name <%= @server_name %>;
  access_log /opt/nginx/logs/<%= @server_name %>_access.log ltsv;

<%- if @letsencrypt -%>
  ssl_certificate /etc/letsencrypt/live/<%= @server_name %>/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/<%= @server_name %>/privkey.pem;
<%- elsif @selfsigned -%>
  ssl_certificate /etc/pki/tls/certs/localhost.crt;
  ssl_certificate_key /etc/pki/tls/private/localhost.key;
<%- end -%>

  root <%= ::File.join(@rails_root, 'public') %>;
  passenger_enabled on;
  passenger_app_env <%= @rails_env %>;

  gzip on;
  gzip_http_version 1.0;
  gzip_proxied any;
  gzip_min_length 500;
  gzip_disable "MSIE [1-6]\.";
  gzip_types text/plain text/xml text/css
             text/comma-separated-values
             text/javascript application/x-javascript
             application/atom+xml;
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
daddy-0.5.28 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.27 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.26 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.25 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.24 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.23 itamae/cookbooks/nginx/templates/passenger.conf.erb