GitLab配置https证书
1. 打开gitlab.rb 更改配置
vi /etc/gitlab/gitlab.rb 注:配置文件默认安装位置不一,有的情况下在目录 /opt/gitlab/etc/gitlab.rb external_url "https://your.domain.com" # /etc/ssl/your.domain.com ssl证书的路径,自定义 nginx['ssl_certificate'] = "/etc/ssl/your.domain.com.crt" nginx['ssl_certificate_key'] = "/etc/ssl/your.domain.com.key" #(可选)强制HTTP重定向到HTTPS nginx['redirect_http_to_https'] = true # 配置NGINX监听端口: nginx['listen_port'] = 443 nginx['listen_https'] = true
2. 重启GitLab服务使生效
gitlab-ctl reconfigure gitlab-ctl restart
征途漫漫,惟有奋斗!
浙公网安备 33010602011771号