gitlab installation: using localhost
I am following this instruction to install gitlab: https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md
All is well until #7. nginx. I have problem with this specific instruction
# 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
Can I use 127.0.0.1 and localhost for YOUR_SERVER_IP and YOUR_SERVER_FQDN respectively? I really don't want to use any .coms, this gitlab will be used internally.
When I visited localhost, it shows 502 Bad Gateway.
My error_log file content
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"
Your help is highly appreciated. Thank you.
Solution 1:
Verify that /home/git/gitlab/tmp/sockets/gitlab.socket actually exists and have permissions/ownership in-line with the setup instructions. Also, try running these two commands inside of the /home/git/gitlab directory:
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
All items should be green. If not, you'll have to troubleshoot more specifically from there.
Here's a Github issue related to what you are seeing. Hopefully the above steps fix it or at least get you further!
Your database is not setup properly OR your credentials for accessing it are wrong. Please make sure you followed https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/databases.md and did one of the following as instructed for your DB platform.
Mysql
sudo -u git cp config/database.yml.mysql config/database.yml
PostgreSQL
sudo -u git cp config/database.yml.postgresql config/database.yml