How to block redirect http to https in gitlab server?

3.9k Views Asked by At

I'm hosting gitlab-ce on my server and I want to disable redirecting HTTP -> HTTPS in another word I want to free up my port(80) I've already changed this config in gitlab.rb:

nginx['redirect_http_to_https'] = false

but it didn't work. What should I do?

1

There are 1 best solutions below

0
On

By default, GitLab will listen on the port specified in external_url; 80 by default if there's no explicit port number.

There are two ways to change the port number:

  1. Add a port number to external_url like https://gitlab.example.com:8080
  2. Set nginx['listen_port'] -- this useful when you are behind a reverse-proxy and want to change the listen port, but not use the port number in the hostname. This will probably cause issues if you're not using a reverse proxy!

You can also disable https by setting nginx['listen_https'] = false

See gitlab nginx settings for more details.