MySQL

MySQL

我按照这个说明安装 gitlab: https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md

一切正常,直到 #7。nginx。我对这个特定指令有问题

# Change **YOUR_SERVER_IP** and **YOUR_SERVER_FQDN**
# to the IP address and fully-qualified domain name
# of your host serving GitLab
sudo vim /etc/nginx/sites-available/gitlab

我可以使用 127.0.0.1 和 localhost 来你的服务器IP您的服务器的 FQDN分别?我真的不想使用任何.com,这个gitlab将在内部使用。

当我访问本地主机时,它显示 502 Bad Gateway。

我的error_log文件内容

2013/03/24 09:18:21 [crit] 12152#0: *1 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "localhost"

非常感谢您的帮助。谢谢。

答案1

验证/home/git/gitlab/tmp/sockets/gitlab.socket确实存在,并且具有与安装说明一致的权限/所有权。此外,尝试运行这两个命令在里面/主页/git/gitlab目录

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

所有项目都应为绿色。如果不是,则必须从那里进行更具体的故障排除。

这是一个Github 问题与您所看到的内容相关。希望上述步骤可以解决问题,或者至少让您取得进一步的进展!

您的数据库设置不正确或访问数据库的凭据错误。请确保您遵循https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/databases.md并根据您的数据库平台的指示执行以下操作之一。

MySQL

sudo -u git cp config/database.yml.mysql config/database.yml

PostgreSQL

sudo -u git cp config/database.yml.postgresql config/database.yml

相关内容