小编Jas*_*ges的帖子

设置gitlab外部web端口号

如何将 gitlab 的默认端口 80 更改为自定义端口号?

我尝试了两种方法:

在 /etc/gitlab/gitlab.rb 中设置端口

external_port "8888"
Run Code Online (Sandbox Code Playgroud)

然后运行重新配置:

gitlab-ctl reconfigure
Run Code Online (Sandbox Code Playgroud)

在 /var/opt/gitlab/gitlab-rails/etc/gitlab.yml 中设置端口

production: &base
  #
  # 1. GitLab app settings
  # ==========================

  ## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include http://)
    host: gitlab.blitting.com
    port: 8888
    https: false
Run Code Online (Sandbox Code Playgroud)

然后重启gitlab

gitlab-ctl stop
gitlab-ctl start
Run Code Online (Sandbox Code Playgroud)

有了这两个,gitlab 继续在默认的 80 端口号上运行。

gitlab

69
推荐指数
4
解决办法
15万
查看次数

标签 统计

gitlab ×1