为什么我通过代理使用GitLab,没有布局的界面

时间:2015-11-06 13:31:36

标签: gitlab reverse-proxy http-proxy

为什么我通过代理使用GitLab,没有布局的界面?

enter image description here

Apache conf:

enter image description here

1 个答案:

答案 0 :(得分:1)

由于您使用的是反向代理,请参阅this issue

  

我不知道您的apache代理传递是如何配置的。我假设您使用的是:

ProxyPass http://127.0.0.1:8880
ProxyPassReverse http://127.0.0.1:8880
  

您可以定义代理在“虚拟子文件夹”中的行为方式,请尝试以下操作:

ProxyPass /gitlab http://127.0.0.1:8880
ProxyPassReverse /gitlab http://127.0.0.1:8880

请注意,必须将GitLab配置为在子文件夹中运行 config/application.rb确实包含以下说明:

# 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 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"