From 08db501b62f5216b27bcf48f24400bc090f84197 Mon Sep 17 00:00:00 2001 From: Harald Skoglund Date: Wed, 13 Nov 2013 12:24:59 +0100 Subject: [PATCH] Added proxy_set_header and vhost_cfg_prepend to the ssl vhost template. --- templates/vhost/vhost_ssl_header.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/vhost/vhost_ssl_header.erb b/templates/vhost/vhost_ssl_header.erb index 2de8b1e4c..4a1dff0ea 100644 --- a/templates/vhost/vhost_ssl_header.erb +++ b/templates/vhost/vhost_ssl_header.erb @@ -21,9 +21,19 @@ server { auth_basic_user_file "<%= @auth_basic_user_file %>"; <% end -%> +<% @proxy_set_header.each do |header| -%> + proxy_set_header <%= header %>; +<% end -%> + access_log <%= @ssl_access_log %>; error_log <%= @ssl_error_log %>; +<%# make sure that allow comes before deny by forcing the allow key (if it -%> +<%# exists) to be first in the output order. The hash keys also need to be -%> +<%# sorted so that the ordering is stable. -%> +<% if @vhost_cfg_prepend -%><% vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> + <%= key %> <%= value %>; +<% end -%><% end -%> <% if @root -%> root <%= @root %>; <% end -%>