我主机上的Gitlab运行在Docker上。
docker exec -it gitlab /bin/bash
打开gitlab容器、编辑gitlab.yml文件
vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: git.xxxx.com
port: 80
https: false
配置完了之后 gitlab-ctl restart 重启gitlab 服务器。
- 注意:重启服务器后不可以运行
gitlab-ctl reconfigure否则的话他会重新编译配置文件这边配置的参数会失效