Sha256: 999a4baedf4d5af47cacfb3e9c2568e75600e4684787f39bae45331fb78d933e

Contents?: true

Size: 1.08 KB

Versions: 17

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/shared/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

17 entries across 17 versions & 1 rubygems

Version Path
daddy-0.7.3 itamae/cookbooks/nginx/config/templates/_passenger.conf.erb
daddy-0.7.2 itamae/cookbooks/nginx/config/templates/_passenger.conf.erb
daddy-0.7.1 itamae/cookbooks/nginx/config/templates/_passenger.conf.erb
daddy-0.7.0 itamae/cookbooks/nginx/config/templates/_passenger.conf.erb
daddy-0.6.6 itamae/cookbooks/nginx/templates/etc/nginx/conf.d/servers/passenger.conf.erb
daddy-0.6.5 itamae/cookbooks/nginx/templates/etc/nginx/conf.d/servers/passenger.conf.erb
daddy-0.6.4 itamae/cookbooks/nginx/templates/etc/nginx/conf.d/servers/passenger.conf.erb
daddy-0.6.3 itamae/cookbooks/nginx/templates/etc/nginx/conf.d/servers/passenger.conf.erb
daddy-0.6.2 itamae/cookbooks/nginx/templates/etc/nginx/conf.d/servers/passenger.conf.erb
daddy-0.6.1 itamae/cookbooks/nginx/templates/etc/nginx/conf.d/servers/passenger.conf.erb
daddy-0.6.0 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.34 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.33 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.32 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.31 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.30 itamae/cookbooks/nginx/templates/passenger.conf.erb
daddy-0.5.29 itamae/cookbooks/nginx/templates/passenger.conf.erb