Gitlab 开启https

2020-03-07  本文已影响0人  舒官人
  1. 开启 Let’s Encrypt https证书
# vim /etc/gitlab/gitlab.rb  配置文件地址
letsencrypt['enable'] = true                      # GitLab 10.5 and 10.6 require this option
external_url "https://gitlab.example.com"         # Must use https protocol
letsencrypt['contact_emails'] = ['foo@email.com'] # Optional

# https证书检测
# This example renews every 7th day at 12:30
letsencrypt['auto_renew_hour'] = "12"
letsencrypt['auto_renew_minute'] = "30"
letsencrypt['auto_renew_day_of_month'] = "*/7"
  1. 重启配置

sudo gitlab-ctl reconfigure
sudo gitlab-ctl renew-le-certs

上一篇下一篇

猜你喜欢

热点阅读