• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

韩工

  • 博客园
  • 管理

公告

View Post

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

  

 

征途漫漫,惟有奋斗!

posted on 2025-02-18 09:44  韩工-Hill  阅读(250)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3