From 6614140eaead45fb715f95b3de85260c28aae013 Mon Sep 17 00:00:00 2001 From: SolidNerd Date: Sat, 23 Jul 2016 12:20:51 +0200 Subject: [PATCH] Fix Host header in nginx configuration This will fix the problem if you don't use the typical HTTP/HTTPS ports otherwise nginx will redirects you with the default ports of HTTP/HTTPS . --- assets/runtime/config/nginx/gitlab | 2 +- assets/runtime/config/nginx/gitlab-ssl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/runtime/config/nginx/gitlab b/assets/runtime/config/nginx/gitlab index f4a4760f..2dc4b868 100644 --- a/assets/runtime/config/nginx/gitlab +++ b/assets/runtime/config/nginx/gitlab @@ -55,7 +55,7 @@ server { ## By overwriting Host and clearing X-Forwarded-Host we ensure that ## internal HTTP redirects generated by GitLab always send users to ## YOUR_SERVER_FQDN. - proxy_set_header Host {{GITLAB_HOST}}; + proxy_set_header Host {{GITLAB_HOST}}:{{GITLAB_PORT}}; proxy_set_header X-Forwarded-Host ""; proxy_set_header X-Real-IP $remote_addr; diff --git a/assets/runtime/config/nginx/gitlab-ssl b/assets/runtime/config/nginx/gitlab-ssl index bd6d21b4..de2c9251 100644 --- a/assets/runtime/config/nginx/gitlab-ssl +++ b/assets/runtime/config/nginx/gitlab-ssl @@ -101,7 +101,7 @@ server { ## By overwriting Host and clearing X-Forwarded-Host we ensure that ## internal HTTP redirects generated by GitLab always send users to ## YOUR_SERVER_FQDN. - proxy_set_header Host {{GITLAB_HOST}}; + proxy_set_header Host {{GITLAB_HOST}}:{{GITLAB_PORT}}; proxy_set_header X-Forwarded-Host ""; proxy_set_header X-Real-IP $remote_addr;