summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-01 16:24:43 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-01 16:24:43 +0000
commit6b0e37b05fae14530b10b9357ebaef87920222e3 (patch)
tree8ceef799362586b70ed490b56f14425d00a0845e /doc
parentd4e327a592df080588ed8fe616979310000cb288 (diff)
parentf5202c20b0031f8b883576423e3320ca44c5eca3 (diff)
downloadgitlab-ce-6b0e37b05fae14530b10b9357ebaef87920222e3.tar.gz
Merge branch 'rel-url-fix' into 'master'
Fix relative URL See https://github.com/gitlabhq/gitlabhq/issues/10053 1. Same configuration way for relative URL like with Omnibus 2. Loading the relative configuration from Rakefile as Rails do not load initializers for `asset:precompile` First point has another positive side effect: no collisions (due to git controlled `application.rb`) any more during the upgrades of source based installations and relative url configuration - [x] tests on the source based installation - [x] tests on the centos&ubuntu omnibus packages Fixes: gitlab-org/gitlab-ce#13730, gitlab-org/gitlab-ce#13727, gitlab-org/omnibus-gitlab#1143 and https://github.com/gitlabhq/gitlabhq/issues/10053 See merge request !2979
Diffstat (limited to 'doc')
-rw-r--r--doc/install/relative_url.md20
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/install/relative_url.md b/doc/install/relative_url.md
index b341b6311c6..0245febfcd8 100644
--- a/doc/install/relative_url.md
+++ b/doc/install/relative_url.md
@@ -25,7 +25,7 @@ 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/application.rb`
+- `/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`
@@ -66,8 +66,14 @@ Make sure to follow all steps below:
sudo service gitlab stop
```
-1. Edit `/home/git/gitlab/config/application.rb` and uncomment/change the
- following line:
+1. Create `/home/git/gitlab/config/initializers/relative_url.rb`
+
+ ```shell
+ cp /home/git/gitlab/config/initializers/relative_url.rb.sample \
+ /home/git/gitlab/config/initializers/relative_url.rb
+ ```
+
+ and change the following line:
```ruby
config.relative_url_root = "/gitlab"
@@ -119,8 +125,12 @@ Make sure to follow all steps below:
### Disable relative URL in GitLab
-To disable the relative URL, follow the same steps as above and set up the
-GitLab URL to one that doesn't contain a relative path.
+To disable the relative URL:
+
+1. Remove `/home/git/gitlab/config/initializers/relative_url.rb`
+
+1. Follow the same as above starting from 2. and set up the
+ GitLab URL to one that doesn't contain a relative path.
[omnibus-rel]: http://doc.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab "How to setup relative URL in Omnibus GitLab"
[restart gitlab]: ../administration/restart_gitlab.md#installations-from-source "How to restart GitLab"