Changing the default port for GitLab
So I was having a little bit of trouble with a GitLab server that I was setting up.
As I already have applications using Apache, I found that using port 80 for Apache and GitLab was just not going to work due to the GitLab using Nginx. I decided to set GitLab to be on another port, 1st I tried to change this in the config file at /opt/gitlab/embedded/conf/nginx.conf but found that this did not work, the solution was actually very simple, I just needed to add the port to the external url in the gitlab.rb file and reconfigure.
Stop GitLab if it’s not stoped already
gitlab-ctl stop
edit gitlab.rb config file
vi /etc/gitlab/gitlab.rb
change external_url so it has the port number you want to use on the end
external_url 'http://yourdomain.tld:5600/'
reconfigure gitlab
gitlab-ctl reconfigure
Start GitLab if it’s not started already
gitlab-ctl start
Hope this help you make the changes to your GitLab ports