官方文档
Install GitLab under a relative URL
-
/home/git/gitlab/config/initializers/relative_url.rb
cp /home/git/gitlab/config/initializers/relative_url.rb.sample \ /home/git/gitlab/config/initializers/relative_url.rb vim /home/git/gitlab/config/initializers/relative_url.rb config.relative_url_root = "/codes"
-
/home/git/gitlab/config/gitlab.yml
vim /home/git/gitlab/config/gitlab.yml relative_url_root: /codes
-
/home/git/gitlab/config/puma.rb
vim /home/git/gitlab/config/puma.rb ENV['RAILS_RELATIVE_URL_ROOT'] = "/codes"
-
/home/git/gitlab-shell/config.yml
vim /home/git/gitlab-shell/config.yml gitlab_url: http://127.0.0.1/codes
-
/etc/default/gitlab
vim /etc/default/gitlab # gitlab_workhorse_options -authBackend http://127.0.0.1:8080/codes
-
/home/git/gitaly/config.toml
vim /home/git/gitaly/config.toml [gitlab] url = "http://127.0.0.1/codes"
Restart
- gitaly
- gitlab