Gitlab is set up with this in gitlab.rb:
external_url 'https://git.mydomain.com:1443'
This works fine and it does work via port 1443.
The problem is that port 80 (which I need for another application) is still blocked as well, even though it is not needed at all.
How can I turn off all http services in gitlab and rely solely on https?
Other settings in gitlab.rb:
Nginx is commented out:
# nginx['enable'] = true
# nginx['redirect_http_to_https'] = true
# nginx['redirect_http_to_https_port'] = 8080
2
Answers
Check the configurations in the ‘gitlab.rb’ file. Have you activated the Nginx listener by any chance?.
That your nginx settings are commented out does not speak directly to whether the bundled Nginx subsystem is enabled. According to its documentation, in fact, the Linux distribution of Gitlab bundles Nginx and enables it by default.
If you are running a separate web server on the same machine then your best bet is to enable HTTPS there, and use it in front of Gitlab instead of Gitlab’s bundled Nginx. The linked docs describe the Gitlab side of how to configure that, starting, but not ending, with …
. There will be configuration needed on the external server side, too. The Gitlab docs speak to that a bit, but you might need someone with expertise in configuring the external server to help with integrating that.
As a possible quick & dirty alternative, it might work to configure the Nginx listen port in your Gitlab config to something other than port 80. Maybe tp your HTTPS port:
Or if that breaks HTTPS service then maybe a random other port would be better, say …