使用现有的Nginx安装转发到GitLab子域 [英] Forwarding to GitLab Subdomain with Existing Nginx Installation

查看:288
本文介绍了使用现有的Nginx安装转发到GitLab子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注说明,似乎缺少了一些关键信息.在使用非捆绑式Web服务器"部分中,它从不解释我如何需要重新配置Nginx安装以将代理反向传递到GitLab.

I've been following the instructions from the GitLab wiki, however, it seems as if some key pieces of information are missing. In the section "Using a Non-Bundled Web Server" it never explains how I need to reconfigure my Nginx installation to reverse proxy over to GitLab.

基本上,我想在git.example.com下安装GitLab,但是我似乎找不到能做到这一点的现有Nginx安装的配置设置. Wiki页面上继续讨论如何配置现有的Passenger/Nginx安装,但是我没有Passenger,所以我认为这不适用于我的情况.

Basically, I'd like to have GitLab installed under git.example.com, but I can't seem to find the configuration settings for my existing Nginx installation that'll do that. The wiki page goes on to talk about configuring an existing Passenger/Nginx installation, but I don't have Passenger, so I don't think that applies to my situation.

我认为最简单的解决方案是,如果有一种方法可以告诉Gitlab使用它的内置Nginx并仅在内部端口上侦听,然后将我的其他Nginx转发到该端口,但是我似乎无法弄清楚如何配置Gitlab来处理该问题.

I suppose the easiest solution would be if there were a way to tell Gitlab to use it's built-in Nginx and just listen on an internal port, and then have my other Nginx forward to that port, but I can't seem to figure out how to configure Gitlab to handle that.

任何帮助将不胜感激.

推荐答案

在Ubuntu上使用现有的Nginx服务器运行

Run with existing Nginx server on Ubuntu

  1. 安装gitlab
  2. 编辑配置文件/etc/gitlab/gitlab.rb并取消注释或附加以下内容:
    • nginx ['enable'] = false
    • unicorn ['enable'] =假
    • gitlab_rails ['internal_api_url'] =' http://git.yourdomain.com '
    • web_server ['external_users'] = ['www-data']
  1. Install gitlab
  2. Edit configuration file /etc/gitlab/gitlab.rb and uncomment or append following:
    • nginx['enable'] = false
    • unicorn['enable'] = false
    • gitlab_rails['internal_api_url'] = 'http://git.yourdomain.com'
    • web_server['external_users'] = ['www-data']
  • sudo gitlab-ctl启动PostgreSQL
  • sudo gitlab-ctl重新配置
  • sudo服务nginx重新启动
  • sudo gitlab-ctl启动redis

这篇关于使用现有的Nginx安装转发到GitLab子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆