Commit 2ac7eb9efa3df9b8d0331dc1a9dbfbe5dad26fa8

Authored by Marco Wessel
1 parent ba807f1e

Rename to listen_address, move to nginx section

files/gitlab-cookbooks/gitlab/attributes/default.rb
@@ -50,7 +50,6 @@ default['gitlab']['gitlab-rails']['rate_limit_period'] = 60 @@ -50,7 +50,6 @@ default['gitlab']['gitlab-rails']['rate_limit_period'] = 60
50 50
51 default['gitlab']['gitlab-rails']['gitlab_host'] = node['fqdn'] 51 default['gitlab']['gitlab-rails']['gitlab_host'] = node['fqdn']
52 default['gitlab']['gitlab-rails']['gitlab_port'] = 80 52 default['gitlab']['gitlab-rails']['gitlab_port'] = 80
53 -default['gitlab']['gitlab-rails']['gitlab_addr'] = '*'  
54 default['gitlab']['gitlab-rails']['gitlab_https'] = false 53 default['gitlab']['gitlab-rails']['gitlab_https'] = false
55 default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@#{node['fqdn']}" 54 default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@#{node['fqdn']}"
56 default['gitlab']['gitlab-rails']['gitlab_support_email'] = "support@localhost" 55 default['gitlab']['gitlab-rails']['gitlab_support_email'] = "support@localhost"
@@ -211,3 +210,4 @@ default['gitlab']['nginx']['redirect_http_to_https'] = false @@ -211,3 +210,4 @@ default['gitlab']['nginx']['redirect_http_to_https'] = false
211 default['gitlab']['nginx']['redirect_http_to_https_port'] = 80 210 default['gitlab']['nginx']['redirect_http_to_https_port'] = 80
212 default['gitlab']['nginx']['ssl_certificate'] = "/etc/gitlab/ssl/#{node['fqdn']}.crt" 211 default['gitlab']['nginx']['ssl_certificate'] = "/etc/gitlab/ssl/#{node['fqdn']}.crt"
213 default['gitlab']['nginx']['ssl_certificate_key'] = "/etc/gitlab/ssl/#{node['fqdn']}.key" 212 default['gitlab']['nginx']['ssl_certificate_key'] = "/etc/gitlab/ssl/#{node['fqdn']}.key"
  213 +default['gitlab']['nginx']['listen_address'] = '*'
files/gitlab-cookbooks/gitlab/recipes/nginx.rb
@@ -48,7 +48,6 @@ template nginx_vars[:gitlab_http_config] do @@ -48,7 +48,6 @@ template nginx_vars[:gitlab_http_config] do
48 :https => node['gitlab']['gitlab-rails']['gitlab_https'], 48 :https => node['gitlab']['gitlab-rails']['gitlab_https'],
49 :socket => node['gitlab']['unicorn']['socket'], 49 :socket => node['gitlab']['unicorn']['socket'],
50 :port => node['gitlab']['gitlab-rails']['gitlab_port'], 50 :port => node['gitlab']['gitlab-rails']['gitlab_port'],
51 - :bind_address => node['gitlab']['gitlab-rails']['gitlab_addr'],  
52 :redirect_http_to_https => node['gitlab']['nginx']['redirect_http_to_https'], 51 :redirect_http_to_https => node['gitlab']['nginx']['redirect_http_to_https'],
53 :redirect_http_to_https_port => node['gitlab']['nginx']['redirect_http_to_https_port'], 52 :redirect_http_to_https_port => node['gitlab']['nginx']['redirect_http_to_https_port'],
54 :ssl_certificate => node['gitlab']['nginx']['ssl_certificate'], 53 :ssl_certificate => node['gitlab']['nginx']['ssl_certificate'],
files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb
@@ -21,7 +21,7 @@ upstream gitlab { @@ -21,7 +21,7 @@ upstream gitlab {
21 21
22 <% if @https && @redirect_http_to_https %> 22 <% if @https && @redirect_http_to_https %>
23 server { 23 server {
24 - listen <%= @bind_address %>:<%= @redirect_http_to_https_port %>; 24 + listen <%= @listen_address %>:<%= @redirect_http_to_https_port %>;
25 server_name <%= @fqdn %>; 25 server_name <%= @fqdn %>;
26 server_tokens off; 26 server_tokens off;
27 return 301 https://<%= @fqdn %>:<%= @port %>$request_uri; 27 return 301 https://<%= @fqdn %>:<%= @port %>$request_uri;
@@ -29,7 +29,7 @@ server { @@ -29,7 +29,7 @@ server {
29 <% end %> 29 <% end %>
30 30
31 server { 31 server {
32 - listen <%= @bind_address %>:<%= @port %>; 32 + listen <%= @listen_address %>:<%= @port %>;
33 server_name <%= @fqdn %>; 33 server_name <%= @fqdn %>;
34 server_tokens off; # don't show the version number, a security best practice 34 server_tokens off; # don't show the version number, a security best practice
35 root /opt/gitlab/embedded/service/gitlab-rails/public; 35 root /opt/gitlab/embedded/service/gitlab-rails/public;