訪問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