【问题标题】:Gitlab does not respond when port is specified for SSL当为 SSL 指定端口时,Gitlab 没有响应
【发布时间】:2015-07-27 10:37:15
【问题描述】:

我正在 docker 中运行 Omnibus 版本的 Gitlab。

我已经编辑了我的 gitlab.rb 文件,以便通过在 external_url 前加上 https:// 来启用 https。这似乎工作得很好。但是,当我还将端口添加到 URL 时:

external_url = 'https://www.example.com:12345'

我的浏览器显示“连接被拒绝”错误。这是为什么呢?

【问题讨论】:

    标签: ssl https gitlab


    【解决方案1】:

    如果你想改变 GitLab 运行的默认端口,你必须把它放在你的 gitlab.rb 文件中:

    gitlab_rails['gitlab_host'] = 'example.com'
    gitlab_rails['gitlab_port'] = 12345
    gitlab_rails['gitlab_https'] = true
    

    设置此参数后,您必须运行# gitlab-ctl reconfigure

    还可以查看/opt/gitlab/embedded/service/gitlab-shell/config.yml:您可以在这里找到有趣的参数:SSL 证书路径

    http_settings:
      #user: someone
      #password: somepass
      ca_file: /etc/ssl/cert.pem
      ca_path: /etc/pki/tls/certs
      self_signed_cert: false
    

    【讨论】:

    • 您的第一句话似乎不正确,因为我可以通过更改 external_url 来破坏我的 Gitlab。
    猜你喜欢
    • 2018-04-16
    • 1970-01-01
    • 1970-01-01
    • 2010-10-29
    • 1970-01-01
    • 2011-06-24
    • 1970-01-01
    • 1970-01-01
    • 2019-11-02
    相关资源
    最近更新 更多