如何使用非捆绑的网络服务器设置 Gitlab-omnibus?

Édo*_*pez 11 nginx debian-wheezy gitlab

安装

  1. gitlab通过debian 7(version 7.8.1-omnibus-1_amd64.deb)上的 omnibus 包安装了该包;
  2. 按照使用非捆绑网络服务器中的描述更改设置
  3. 运行重新配置命令:(sudo gitlab-ctl reconfigure完成没有错误)。

nginx

nginx除了包可能使用以下/etc/gitlab/gitlab.rb文件创建的内容外,我没有此 gitlab 的 ' 配置:

external_url 'http://git.mydomain.fr'
web_server['external_users'] = ['www-data']
nginx['enable'] = false
ci_nginx['enable'] = false
Run Code Online (Sandbox Code Playgroud)

日志

/var/log/nginx/gitlab_error.log

2015/02/28 14:29:16 [alert] 4137#0: *14738 768 worker_connections are not enough while connecting to upstream, client: x.x.128.194, server: git.mydomain.fr, request: "GET / HTTP/1.0", upstream
: "http://x.x.128.194:80/", host: "git.mydomain.fr"
Run Code Online (Sandbox Code Playgroud)

/var/log/nginx/gitlab_access.log

在 acces.log 中,我收到了数百个关于/.

x.x.128.194 - - [28/Feb/2015:14:29:16 +0100] "GET / HTTP/1.0" 500 186 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"
x.x.128.194 - - [28/Feb/2015:14:29:16 +0100] "GET / HTTP/1.0" 500 186 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"
x.x.128.194 - - [28/Feb/2015:14:29:16 +0100] "GET / HTTP/1.0" 500 186 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"x.x.128.194 - - [28/Feb/2015:14:29:16 +0100] "GET / HTTP/1.0" 500 186 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"
x.x.128.194 - - [28/Feb/2015:14:29:16 +0100] "GET / HTTP/1.0" 500 186 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0"
Run Code Online (Sandbox Code Playgroud)

尝试使用本地links2或外部联系服务时,出现错误502 Bad Gateway

  • 我需要创建一个自定义的 nginx 配置吗?

Édo*_*pez 9

继续探索我找到了/var/opt/gitlab/目录并解决了这个问题:

sudo ln -s /var/opt/gitlab/nginx/conf/gitlab-http.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-{available,enabled}/gitlab-http.conf
sudo service nginx reload
Run Code Online (Sandbox Code Playgroud)