Sha256: de64e332d5bae1d385c1cc82e1f75bd387bf4c8bbd6d04411486c91d3675c50e

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 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 -%>

  location ^~ /.well-known/acme-challenge/ {
    default_type "text/plain";
    root /opt/nginx/shared/letsencrypt;
  }

  location / {
    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

5 entries across 5 versions & 1 rubygems

Version Path
itamae-plugin-recipe-daddy-0.1.22 lib/itamae/plugin/recipe/daddy/passenger/templates/_passenger.conf.erb
itamae-plugin-recipe-daddy-0.1.21 lib/itamae/plugin/recipe/daddy/passenger/templates/_passenger.conf.erb
itamae-plugin-recipe-daddy-0.1.20 lib/itamae/plugin/recipe/daddy/passenger/templates/_passenger.conf.erb
itamae-plugin-recipe-daddy-0.1.19 lib/itamae/plugin/recipe/daddy/passenger/templates/_passenger.conf.erb
itamae-plugin-recipe-daddy-0.1.18 lib/itamae/plugin/recipe/daddy/passenger/templates/_passenger.conf.erb