-
Achilleas Pipinellis authored
[ci skip]
Achilleas Pipinellis authored[ci skip]
Install GitLab under a relative URL
Note: This document describes how to run GitLab under a relative URL for installations from source. If you are using an Omnibus package, the steps are different. Use this guide along with the installation guide if you are installing GitLab for the first time.
While it is recommended to install GitLab on its own (sub)domain, sometimes
this is not possible due to a variety of reasons. In that case, GitLab can also
be installed under a relative URL, for example https://example.com/gitlab
.
There is no limit to how deeply nested the relative URL can be. For example you
could serve GitLab under /foo/bar/gitlab/git
without any issues.
Note that by changing the URL on an existing GitLab installation, all remote URLs will change, so you'll have to manually edit them in any local repository that points to your GitLab instance.
The TL;DR list of configuration files that you need to change in order to serve GitLab under a relative URL is:
/home/git/gitlab/config/initializers/relative_url.rb
/home/git/gitlab/config/gitlab.yml
/home/git/gitlab/config/unicorn.rb
/home/git/gitlab-shell/config.yml
/etc/default/gitlab
After all the changes you need to recompile the assets and restart GitLab.