访问gitlab,出现:502
GitLab在使用的过程中,会开启80端口,如果80端口被其他的应用程序占用,则GitLab的该项服务不能使用,所以访问GitLab会失败。大多数皆是此问题。
还要注意gitlab还要使用8080端口,因此要注意可以把gitlab端口改为别的无服务占用的端口。
改gitlab端口:
1.vim /etc/gitlab/gitlab.rb
unicorn['port'] = 9090
nginx['listen_port'] = 9099
2.vim /var/opt/gitlab/gitlab-rails/etc/unicorn.rb
listen “127.0.0.1:9090”, :tcp_nopush => true
修改默认的gitlab nginx的web服务80端
3.vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
listen *:9099;
4.重启配置:
sudo gitlab-ctl reconfigure
5.重新启动gitlab
gitlab-ctl restar