1 修改nginx端口
sudo vi /etc/gitlab/gitlab.rb
nginx['listen_port'] = 8088
sudo vi /var/opt/gitlab/nginx/conf/gitlab-http.conf
server {
listen *:8088;
2 修改unicorn端口(可以不修改)
sudo vi /etc/gitlab/gitlab.rb
unicorn['port'] = 8083
sudo vi /var/opt/gitlab/gitlab-rails/etc/unicorn.rb
listen "127.0.0.1:8083", :tcp_nopush => true
3 保存配置,重启。
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
sudo gitlab-ctl status
4 ip:8088访问成功。(重启服务有延时,耐心等待一会,如果是centos可能会打不开网页,防火墙里面放开8081端口即可)