skip to Main Content

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


  1. Check the configurations in the ‘gitlab.rb’ file. Have you activated the Nginx listener by any chance?.

    Login or Signup to reply.
  2. 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 …

    nginx['enable'] = false
    

    . 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:

    nginx['listen_port'] = 1443
    

    Or if that breaks HTTPS service then maybe a random other port would be better, say …

    nginx['listen_port'] = 8080
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search