Gitlab is installed, but only the nginx welcome page shows

I installed gitlab using the installation guide . Everything was fine, but when I open localhost: 80 in the browser everything, I see this message Welcome to nginx! . I can not find the log file with any errors in it.

I am running Ubuntu in VirtualBox. My / etc / nginx / sites-enabled / gitlab configuration file reads:

# 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; } } 
+7
source share
5 answers

The nginx documentation says:

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

This means that in your case you should enter aridev-VirtualBox in your browser instead of localhost.

To get this working, you need to enter aridev-VirtualBox into the local hosts file and point it to the IP address of your VirtualBox PC.

It will look like this:

 192.168.1.1 aridev-VirtualBox 
+5
source

I removed /etc/nginx/sites-enabled/default to get rid of this problem.

+4
source

Try both of orkoden’s recommendations for removing the default site from / etc / nginx / sites -enabled /, and comment out the listen line, since the default default line should be sufficient.

Also, make sure that when making changes to these configurations, disable the gitlab and nginx services and start them first in gitlab order and then nginx.

+1
source

The correct configuration file. # /etc/nginx/sites-enabled/gitlab

Perhaps I think your link to the gitlab file is incorrect.

So an example:

ln -s / etc / nginx / sites-available / default / Etc. / Nginx / sites with / gitlab support

pls check default content == your / etc / nginx / sites -enabled / gitlab Contents

after

+1
source

Me I changed this line:

 proxy_pass http://gitlab; 

:

 proxy_pass http://localhost:3000; 

3000 is the port of my unicorn server.

Also, I made chown root:ngnix in the conf file, and now it works.

0
source

All Articles