獲取證書步驟不敘述任柜,nginx無(wú)法啟動(dòng)問(wèn)題參考 http://www.reibang.com/p/2f77a52458db
1危虱、打開(kāi)gitlab.rb 更改配置
vi /etc/gitlab/gitlab.rb
external_url "https://your.domain.com"
# /etc/ssl/your.domain.com這個(gè)是你存儲(chǔ)ssl證書的路徑脾歧,自定義
nginx['ssl_certificate'] = "/etc/ssl/your.domain.com/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/ssl/your.domain.com/privkey.key"
#(可選)強(qiáng)制HTTP重定向到HTTPS:
nginx['redirect_http_to_https'] = true
# 配置NGINX監(jiān)聽(tīng)端口:
nginx['listen_port'] = 443
nginx['listen_https'] = true
2窑邦、應(yīng)用配置并重啟GitLab
gitlab-ctl reconfigure
gitlab-ctl restart