summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-11-07 14:28:36 +0000
committerMarin Jankovski <marin@gitlab.com>2014-11-07 14:28:36 +0000
commit36f9224e4a79b49d0958476395d1472ba9b52a2a (patch)
tree2b849df95ea869221ac75bb28bc58a36b0b05ea8
parent1d337defec2f180744ec9a3e03bd3786b184b113 (diff)
parente3098b69e7a4bc8b08bd85093204305991d8370d (diff)
downloadgitlab-ce-36f9224e4a79b49d0958476395d1472ba9b52a2a.tar.gz
Merge branch 'nginx' into 'master'
Don't enable IPv4 *only* on nginx. I came across this issue when initially setting up gitlab and fixed it locally. Today, helping someone else set up their own instance, I came across this issue again: The sample nginx configuration files disable IPv6 by default, making the server inaccesible unless the remote node has native IPv4. IPv4->IPv6 transition mechanisms don't help if the server have proper IPv6 DNS records in-place, which was the case for both of my servers. This branch enables IPv4 and IPv6 by default. Older servers with no external IPv6 connectivity will not fail since they'll have a local-link IPv6 address to bind to anyway. See merge request !231
-rw-r--r--lib/support/nginx/gitlab3
-rw-r--r--lib/support/nginx/gitlab-ssl6
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab
index 49a68c62293..6369c1e02ff 100644
--- a/lib/support/nginx/gitlab
+++ b/lib/support/nginx/gitlab
@@ -33,7 +33,8 @@ upstream gitlab {
## Normal HTTP host
server {
- listen *:80 default_server;
+ listen 0.0.0.0:80 default_server;
+ listen [::]:80 default_server;
server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com
server_tokens off; ## Don't show the nginx version number, a security best practice
root /home/git/gitlab/public;
diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl
index cbb198086b5..e992ebaf656 100644
--- a/lib/support/nginx/gitlab-ssl
+++ b/lib/support/nginx/gitlab-ssl
@@ -39,7 +39,8 @@ upstream gitlab {
## Normal HTTP host
server {
- listen *:80 default_server;
+ listen 0.0.0.0:80;
+ listen [::]:80 default_server;
server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com
server_tokens off; ## Don't show the nginx version number, a security best practice
@@ -50,7 +51,8 @@ server {
## HTTPS host
server {
- listen 443 ssl;
+ listen 0.0.0.0:443 ssl;
+ listen [::]:443 ssl default_server;
server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com
server_tokens off;
root /home/git/gitlab/public;