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 .
This commit is contained in:
SolidNerd 2016-07-23 12:20:51 +02:00
parent a816a44395
commit 6614140eae
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;