Skip to content

support for running in non-root directory/path (RAILS_RELATIVE_URL_ROOT)

Created by: frohoff

I've made some small changes to more robustly and generically allow running gitlab in non-root context-path (i.e. /gitlab) for hostname (and therefore SSL cert) multitenancy. I've been running it in this configuration with apache+mod_proxy and unicorn at work for a couple weeks and everything seems to work, including links in emails, but it's possible there's some darker corners of the app were missed.

I found that in at least some cases executing bundle exec rake assets:clean was required to make sure paths embedded within assets (css urls, etc) were regenerated properly.

Edit: To be clear, this requires that ENV['RAILS_RELATIVE_URL_ROOT'] be specified in config/unicorn.rb, config/environments/*.rb, or elsewhere, as well as a matching "relative_url_root" item in config/gitlab.yml.

Merge request reports