diff --git a/templates/conf.d/nginx.conf.erb b/templates/conf.d/nginx.conf.erb index 435ed6658..3f017d72e 100644 --- a/templates/conf.d/nginx.conf.erb +++ b/templates/conf.d/nginx.conf.erb @@ -332,11 +332,6 @@ mail { <% end -%> <% if @stream -%> stream { - <%-# conf.stream.d gets included either way if $stream is enabled -%> - include <%= @conf_dir %>/conf.stream.d/*.conf; -<% unless @confd_only -%> - include <%= @conf_dir %>/streams-enabled/*; -<% end -%> <% unless @stream_log_format.empty? -%> <% @stream_log_format.sort.each do |key,value| -%> @@ -347,5 +342,11 @@ stream { <%- Array(@stream_access_log).each do |log_item| -%> access_log <%= log_item %><% if @stream_custom_format_log %> <%= @stream_custom_format_log%><% end %>; <% end -%> + + <%-# conf.stream.d gets included either way if $stream is enabled -%> + include <%= @conf_dir %>/conf.stream.d/*.conf; +<% unless @confd_only -%> + include <%= @conf_dir %>/streams-enabled/*; +<% end -%> } <% end -%>