summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-05-13 17:59:08 +0200
committerMarin Jankovski <marin@gitlab.com>2014-05-13 17:59:08 +0200
commit636ec6d3a048957b5cb348d7ff1b0b5bc6973bbf (patch)
tree30e2815fb410184e3bd303ddd2ef84c2209b7156
parentd41fba4d374c5b586a25b755d79a410574f09062 (diff)
downloadgitlab-ce-636ec6d3a048957b5cb348d7ff1b0b5bc6973bbf.tar.gz
Update warnings about relative url support.
-rw-r--r--config/application.rb5
-rw-r--r--config/gitlab.yml.example12
-rw-r--r--config/unicorn.rb.example10
-rw-r--r--lib/support/nginx/gitlab5
4 files changed, 12 insertions, 20 deletions
diff --git a/config/application.rb b/config/application.rb
index 76b19eeb529..f087d3507bc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -66,13 +66,16 @@ module Gitlab
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
+ # Relative url support
# Uncomment and customize the last line to run in a non-root path
# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
- # Note that four settings need to be changed for this to work.
+ # Note that following settings need to be changed for this to work.
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 2) In your gitlab.yml file: relative_url_root: /gitlab
# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
# 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
+ # 5) In lib/support/nginx/gitlab : do not use asset gzipping, remove block starting with "location ~ ^/(assets)/"
+ #
# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
#
# config.relative_url_root = "/gitlab"
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index b6ec80c4c08..07c9681f9ad 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -24,16 +24,8 @@ production: &base
# Otherwise, ssh host will be set to the `host:` value above
# ssh_host: ssh.host_example.com
- # Uncomment and customize the last line to run in a non-root path
- # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
- # Note that four settings need to be changed for this to work.
- # 1) In your application.rb file: config.relative_url_root = "/gitlab"
- # 2) In your gitlab.yml file: relative_url_root: /gitlab
- # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
- # 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
- # 5) In lib/support/nginx/gitlab : do not use asset gzipping, remove block starting with "location ~ ^/(assets)/"
- # To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
- #
+ # WARNING: See config/application.rb under "Relative url support" for the list of
+ # other files that need to be changed for relative url support
# relative_url_root: /gitlab
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example
index ba5e5cdde0b..f6c0f09b51d 100644
--- a/config/unicorn.rb.example
+++ b/config/unicorn.rb.example
@@ -8,14 +8,8 @@
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
-# Uncomment and customize the last line to run in a non-root path
-# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
-# Note that four settings need to be changed for this to work.
-# 1) In your application.rb file: config.relative_url_root = "/gitlab"
-# 2) In your gitlab.yml file: relative_url_root: /gitlab
-# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
-# 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
-# To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
+# WARNING: See config/application.rb under "Relative url support" for the list of
+# other files that need to be changed for relative url support
#
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab
index f64c8d5883c..98c91637390 100644
--- a/lib/support/nginx/gitlab
+++ b/lib/support/nginx/gitlab
@@ -59,6 +59,9 @@ server {
}
# Enable gzip compression as per rails guide: http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression
+ # WARNING: If you are using relative urls do remove the block below
+ # See config/application.rb under "Relative url support" for the list of
+ # other files that need to be changed for relative url support
location ~ ^/(assets)/ {
root /home/git/gitlab/public;
gzip_static on; # to serve pre-gzipped version
@@ -67,4 +70,4 @@ server {
}
error_page 502 /502.html;
-} \ No newline at end of file
+}