Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab url is not correct if I use Nginx proxy with custom https port #3009

Open
serenader2014 opened this issue Sep 24, 2024 · 0 comments
Open

Comments

@serenader2014
Copy link

Here is my docker-compose file content (I have skipped some configs since they are not relevant):

version: '2'

services:
  gitlab:
    restart: unless-stopped
    image: sameersbn/gitlab:17.3.3
    container_name: gitlab
    ports:
    - "20080:80"
    - "20443:443"
    - "10022:22"
    environment:
    - GITLAB_HTTPS=true
    - SSL_SELF_SIGNED=false
    - NGINX_X_FORWARDED_PROTO=https

    - GITLAB_HOST=gitlab.example.com
    - GITLAB_PORT=10443
    - GITLAB_SSH_PORT=10022
    - GITLAB_RELATIVE_URL_ROOT=

And I use Nginx Proxy Manager to proxy gitlab, here is my config:

Proxy host name: gitlab.example.com
Scheme: http
Forward Hostname / IP: 192.168.1.105(my gitlab container's IP)
Forward Port: 20080
SSL Certificate: enabled
HTTP/2 Support: enabled

When I turn on the proxy, I can visit gitlab through https://gitlab.example.com:10443, but in gitlab's frontend page, it shows the incorrect url, for example, the Admin page button's url is https://gitlab.example.com, and every time I try to login into Gitlab, it redirect me to https://gitlab.example.com/users/sign_in, instead of https://gitlab.example.com:10443/users/sign_in, that's quite annoying.

Is there any problem with my config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant