Gitlab 和 Nginx 无法加载 gitlab

Gitlab 和 Nginx 无法加载 gitlab

我刚刚按照本指南在 Ubuntu LTS 12.04 上安装了 gitlab 和 nginx:http://blog.compunet.co.za/gitlab-installation-on-ubuntu-server-12-04/

我昨晚在另一台服务器上安装了它,完全没有问题(有点像测试运行,看看需要多长时间才能启动)。使用 /etc/init.d 重新启动 gitlab 或 nginx 时没有收到任何错误,我的错误日志为空。我知道的唯一可以继续的是 vhost 配置:

    upstream gitlab {
            server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.sock$
    }

    server {
            listen localhost:80;
            server_name gitlab.bluringdev.com;
            root /home/gitlab/gitlab/public;

            # individual nginx logs for this gitlab vhost
            access_log /var/log/nginx/gitlab_access.log;
            error_log /var/log/nginx/gitlab_error.log;

    location / {
            # serve static files from defined root folder;.
            # @gitlab is a named location for the upstream fallback$
            try_files $uri $uri/index.html $uri.html @gitlab;
            }

            # if a file, which is not found in the root folder is r$
            # then the proxy pass the request to the upsteam (gitla$
            location @gitlab {
            proxy_redirect off;
            # you need to change this to "https", if you set "ssl" $
            proxy_set_header X-FORWARDED_PROTO http;
            proxy_set_header Host gitlab.bluringdev.com:80;
            proxy_set_header X-Real-IP $remote_addr;

            proxy_pass http://gitlab;
    }

}

如果有任何其他有用的信息,请告诉我,我会尽快提供。

答案1

我将首先关注此处的官方 gitlab 文档:

https://github.com/gitlabhq/gitlabhq/blob/stable/doc/installation.md

另外,我怀疑您剪切并粘贴了配置来发布您的问题,因为上面的行尾不应该附加“$”。上游 gitlab 块应如下所示:

upstream gitlab {
        server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket;
}

相关内容