I run a
gitlab-ce (13.9.2) docker container on a Synology NAS.
The container starts correctly: gitlab is accessible via
http on ip
NAS IP port
In order to be able to access gitlab web interface via
https on url
443, I have then configured a reverse proxy on the Synology and have opened the port
443 (and blocked port 80) in the firewall. I’ve also set
external_url = 'https://git.nashostname' in
gitlab.rb configuration file then did a
Note: I do it this way in order to benefit of the certificates management feature of the Synology (no need to place the certificate and key on a shared folder).
When I restart the container, if I try to connect to
https://git.nashostname, everything seems to be working fine during the startup of the container (i.e. I see the page with gitlab logo and the error 502 page), but then when the container is fully started,
https://git.nashostname redirects to
http) and then I’m stuck.
If I enter
https://git.nashostname/users/sign_in manually (
https instead of
http) everything works fine.
The question is the following: how can I force the redirect from
https://git.nashostname/users/sign_in instead of
Note: I don’t want to allow access to http port 80, then redirect to https port 443.
Thank you a lot for your help
Source: Docker Questions