说明:配置证书文件使用nginx类型
一、添加证书,开启https
1.修改配置文件 vim /etc/gitlab/gitlab.rb
external_url "https://www.gworg.com" letsencrypt['enable'] = false nginx['redirect_http_to_https'] = true nginx['ssl_certificate'] = "/etc/gitlab/ssl/www.gworg.com.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/www.gworg.com.key"
2.重启 gitlab-ctl reconfigure
二、nginx开启 https
1.修改配置文件 vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
server { listen *:443 ssl http2; server_name www.gworg.com; ssl on; ssl_certificate /etc/gitlab/ssl/www.gworg.com.crt; ssl_certificate_key /etc/gitlab/ssl/www.gworg.com.key; }
2.重启 gitlab-ctl restart
Copyright © 1998 - Gworg, Inc. All Rights Reserved. 江苏光网数字认证有限公司版权所有
苏ICP备15058404号 苏公网安备32058202010008号