debian 7 ( 7.8.1-omnibus-1_amd64.deb )上的omnibus软件包安装了gitlab软件包。 sudo gitlab-ctl reconfigure (完成没有错误)。 我没有得到这个gitlab的nginxconfiguration,除了这个包可能用下面的/etc/gitlab/gitlab.rb文件创build的:
external_url 'http://git.mydomain.fr' web_server['external_users'] = ['www-data'] nginx['enable'] = false ci_nginx['enable'] = false
2015/02/28 14:29:16 [alert] 4137#0: *14738 768 worker_connections are not enough while connecting to upstream, client: xx128.194, server: git.mydomain.fr, request: "GET / HTTP/1.0", upstream : "http://xx128.194:80/", host: "git.mydomain.fr"
在acces.log中,我在/上获得了数百个请求。
xx128.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" xx128.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" xx128.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"xx128.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" xx128.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"
当试图联系本地使用links2或外部我得到一个错误502 Bad Gateway 。
继续探索我find/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
为了确保用户可以访问,你的Nginx用户(通常是www-data或者nginx)应该被添加到gitlab-www组中:
sudo usermod -aG gitlab-www nginx
要么
sudo usermod -aG gitlab-www www-data
如果你符号链接gitlab-http.conf然后得到:
/etc/nginx/sites-enabled/gitlab-http.conf中的未知日志格式“gitlab_access”
只需将/var/opt/gitlab/nginx/conf/nginx.conf的log_format指令添加到您的全局nginxconfiguration中:
http { ... log_format gitlab_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; log_format gitlab_ci_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; log_format gitlab_mattermost_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; ... }
至于gitlab 8,我们不能符号链接到默认的gitlab-http.conf,因为当我们设置nginx['enable'] = false时,web服务器将不会被安装。
只需从GitLab食谱库下载正确的Web服务器configuration,然后将您的首选域名更改为YOUR_SERVER_FQDN 。
有关如何使用非捆绑Web服务器安装gitlab的详细说明 ,请参阅此处 。