Skip to content
Snippets Groups Projects
Commit ecc0c369 authored by Olivier Bazoud's avatar Olivier Bazoud
Browse files

Add nginx ip as attribute

parent 7693d12f
No related branches found
No related tags found
1 merge request!112Nginx ip
Loading
Loading
@@ -26,7 +26,7 @@ GRAPH
mysql-chef_gem (>= 0.0.0)
postgresql (>= 1.0.0)
xfs (>= 0.0.0)
gitlab (0.7.1)
gitlab (0.7.2)
apt (>= 0.0.0)
database (>= 0.0.0)
magic_shell (>= 0.0.0)
Loading
Loading
Loading
Loading
@@ -62,6 +62,9 @@ else
default['gitlab']['shell_revision'] = "v1.9.7"
end
 
# Nginx ip
default['gitlab']['ip'] = "*"
# GitLab configuration
default['gitlab']['git_path'] = "/usr/local/bin/git"
default['gitlab']['host'] = "localhost"
Loading
Loading
Loading
Loading
@@ -19,6 +19,7 @@ template path do
variables({
:path => gitlab['path'],
:host => gitlab['host'],
:ip => gitlab['ip'],
:port => gitlab['port'],
:url => gitlab['url'],
:ssl_certificate_path => gitlab['ssl_certificate_path'],
Loading
Loading
Loading
Loading
@@ -23,6 +23,7 @@ describe "gitlab::nginx" do
variables: {
path: "/home/git/gitlab",
host: "localhost",
ip: "*",
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
Loading
Loading
@@ -65,6 +66,7 @@ describe "gitlab::nginx" do
variables: {
path: "/data/git/gitlab",
host: "localhost",
ip: "*",
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
Loading
Loading
@@ -113,6 +115,7 @@ describe "gitlab::nginx" do
variables: {
path: "/home/git/gitlab",
host: "localhost",
ip: "*",
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
Loading
Loading
@@ -151,6 +154,7 @@ describe "gitlab::nginx" do
variables: {
path: "/data/git/gitlab",
host: "localhost",
ip: "*",
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ upstream gitlab {
 
<% if @port == '443' %>
server {
listen *:80;
listen <%= @ip %>:80;
server_name <%= @host %>;
server_tokens off;
return 301 https://<%= @host %>$request_uri;
Loading
Loading
@@ -29,7 +29,7 @@ server {
<% end %>
 
server {
listen *:<%= @port %>;
listen <%= @ip %>:<%= @port %>;
server_name <%= @host %>;
server_tokens off; # don't show the version number, a security best practice
root <%= @path %>/public;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment