Commit 477449b6562865f17f5e1e7c19b5236eaac9ab44
Exists in
master
and in
2 other branches
Merge branch 'http_redirect_listen_address' into 'master'
Also use new NGINX listen_addresses for redirect See merge request !186
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb
@@ -25,7 +25,9 @@ upstream gitlab { | @@ -25,7 +25,9 @@ upstream gitlab { | ||
25 | 25 | ||
26 | <% if @https && @redirect_http_to_https %> | 26 | <% if @https && @redirect_http_to_https %> |
27 | server { | 27 | server { |
28 | - listen <%= @listen_address %>:<%= @redirect_http_to_https_port %>; | 28 | +<% @listen_addresses.each do |listen_address| %> |
29 | + listen <%= listen_address %>:<%= @redirect_http_to_https_port %>; | ||
30 | +<% end %> | ||
29 | server_name <%= @fqdn %>; | 31 | server_name <%= @fqdn %>; |
30 | server_tokens off; | 32 | server_tokens off; |
31 | return 301 https://<%= @fqdn %>:<%= @port %>$request_uri; | 33 | return 301 https://<%= @fqdn %>:<%= @port %>$request_uri; |