微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

安装了gitlab,但只有nginx欢迎页面显示

我使用安装指南安装了gitlab。 一切正常,但是当我在浏览器中打开本地主机:80时,我看到消息欢迎使用Nginx 。 我找不到任何有任何错误的日志文件

我在VirtualBox中运行Ubuntu。 我的/ etc / Nginx / sites-enabled / gitlabconfiguration文件如下:

# GITLAB # Maintainer: @randx # App Version: 3.0 upstream gitlab { server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket; } server { listen 192.168.1.1:80; # eg,listen 192.168.1.1:80; server_name aridev-VirtualBox; # eg,server_name source.example.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,see below try_files $uri $uri/index.html $uri.html @gitlab; } # if a file,which is not found in the root folder is requested,# then the proxy pass the request to the upsteam (gitlab unicorn) location @gitlab { proxy_read_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694 proxy_connect_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694 proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://gitlab; } }

Git Pull和git push命令之间的起源主和起源/主站之间的区别

Gitlab-Runner服务不能在Windows中工作

Gitlab的自定义钩子没有运行

Windows上的GitLab docker映像的卷问题

启用GitLab Community Edition for Ominbus安装程序的HTTPS自签名证书

在ubuntu 17.04上安装gitlab-ce

无法以普通用户的身份推送到git存储库

我怎样才能重新启动分别在gitlab捆绑Nginx

GitLab 7.4.3 HTTP-Code 500:无法连接到服务器

gitlab如何简化授权ssh密钥的工作?

Nginx文档说:

server names are defined using the server_name directive and determine which server block is used for a given request.

这意味着在你的情况下,你必须在浏览器中输入aridev-VirtualBox而不是localhost。

为了得到这个工作,你必须在你的本地Hosts文件中输入aridev-VirtualBox并将它指向你的VirtualBox PC的IP地址。

这看起来如下所示:

192.168.1.1 aridev-VirtualBox

删除了/etc/Nginx/sites-enabled/default来摆脱这个问题。

请试着遵循orkoden关于从/ etc / Nginx / sites-enabled /删除认网站的建议,但也要注释掉你的listen线,因为认的隐含线应该足够了。

另外,请确保在对这些配置进行更改时,关闭gitlab和Nginx服务,并按照gitlab的顺序,然后是Nginx启动它们。

你的配置文件是正确的。 # /etc/Nginx/sites-enabled/gitlab

也许我认为你的gitlab文件链接错误的。

所以例子:

ls -s / etc / Nginx / sites-available / default / etc / Nginx / sites-enabled / gitlab

请检查内容==你的/ etc / Nginx / sites-enabled / gitlab内容

我改变了这一行:

proxy_pass http://gitlab;

这样 :

proxy_pass http://localhost:3000;

3000是我的独角兽服务器的端口。

而且我在conf文件上做了chown root:ngnix ,现在就可以工作了。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐