amazon ec2 ubuntu with gitlab and nginx - cant load?

Posted by thebluefox on Server Fault See other posts from Server Fault or by thebluefox
Published on 2014-06-06T17:20:04Z Indexed on 2014/06/09 21:27 UTC
Read the original article Hit count: 250

Filed under:
|
|
|

Ok, so I've spooled up an Amazon EC2 server running Ubuntu, and then followed the instructions below to install GitLab;

http://doc.gitlab.com/ce/install/installation.html

The only step I've not been able to complete is running the following check on the status;

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

I get the following error;

rake aborted!
Errno::ENOMEM: Cannot allocate memory - whoami

Which I presume is becuase my EC2 is just running a free tier setup, so isn't that well spec'd.

Regardless, I've been trying to access this through my browser. I've set up the elastic IP and pointed my domain at it (for the purpose of this, lets say its git.mydom.co.uk). Doing a whois on this domain shows me its pointing to the right place.

For some reason though, I get the "Oops, Chrome could not connect to git.mydom.co.uk". Now - for a period of time I was getting the Nginx holding page (telling me I still needed to perform configuration). This though disappeared after removing the default file from /etc/nginx/sites-enabled/ (after reading this could be issue on a troubleshooting page). Since then, I've had nothing, even when I symlinked the file back in from /sites-available. I've tried changing the owner of the git.mydom.co.uk file sat inside /sites-enabled and /sites-available to www-data, as suggested here, but I could only change the permission of the file in /sites-available, and not the symlinked one in /sites-enabled. The content of this file is as follows;

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

server {
  listen *:80 default_server;         # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
  server_name git.mydom.co.uk;     # e.g., server_name source.example.com;
  server_tokens off;     # don't show the version number, a security best practice
  root /home/git/gitlab/public;

  # Increase this if you want to upload large attachments
  # Or if you want to accept large git objects over http
  client_max_body_size 20m;

  # 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;
  }

All the paths mentioned in here look ok...I'm about at the end of my knowledge now!

© Server Fault or respective owner

Related posts about ubuntu

Related posts about nginx