From 4a480931a5ad6ea5ae36925091951b972ca00cc9 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 10 May 2019 07:00:53 +0200 Subject: [PATCH] Fix bug in nginx config Server name isn't recognized when adding a header directive before like this. --- .../kosmos-hubot/templates/default/nginx_conf_hubot.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site-cookbooks/kosmos-hubot/templates/default/nginx_conf_hubot.erb b/site-cookbooks/kosmos-hubot/templates/default/nginx_conf_hubot.erb index a143bcd..e7848c1 100644 --- a/site-cookbooks/kosmos-hubot/templates/default/nginx_conf_hubot.erb +++ b/site-cookbooks/kosmos-hubot/templates/default/nginx_conf_hubot.erb @@ -8,10 +8,10 @@ upstream _express_<%= @server_name.gsub(".", "_") %> { <% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%> server { listen 443 ssl http2; - add_header Strict-Transport-Security "max-age=15768000"; - server_name <%= @server_name %>; + add_header Strict-Transport-Security "max-age=15768000"; + access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json; error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn;