0

I have an Ubuntu 14.4 server which has Nginx on it, I installed Gitlab omnibus package on it which is bundled with it's own Nginx server, So for the sake of using only one Nginx server to save resources i configured Gitlab to use the non bundled server by using this instructions but the problem is that i have the Big Blue Button web conferencing system installed on the server and it's using the port 80, so i couldn't access Gitlab via the browser at all. I tried using the bundled server with different port for it and it worked but is there anyway that i can make Gitlab use the non bundled server but with a different port than 80 or with it's own directory?

1 Answers1

0

I freshly installed gitlab and nginx in CentOS7. Your install might be different, but this is the spirit.

So I followed the instructions they provide. Edit /etc/gitlab/gitlab.rb :

[...]
#####################
# GitLab Web server #
#####################
## see: https://gitlab.com/gitlab-org/omnibus-gitlab/tree/629def0a7a26e7c2326566f0758d4a27857b52a3/doc/settings/nginx.md#using-a-non-bundled-web-server
## When bundled nginx is disabled we need to add the external webserver user to the GitLab webserver group.

web_server['external_users'] = ['nginx'] # the user running my nginx is nginx, its an array.
# web_server['username'] = 'gitlab-www'
# web_server['group'] = 'gitlab-www'
# web_server['uid'] = nil
# web_server['gid'] = nil
# web_server['shell'] = '/bin/false'
# web_server['home'] = '/var/opt/gitlab/nginx'


################
# GitLab Nginx #
################
## see: https://gitlab.com/gitlab-org/omnibus-gitlab/tree/629def0a7a26e7c2326566f0758d4a27857b52a3/doc/settings/nginx.md

nginx['enable'] = false
[...]

Then I gitlab-ctl reconfigure

After that I created the following server in nginx. On my installation I had to modify the provided file /etc/nginx/conf.d/default.conf, but I guess you should just look for the file where you define your servers.

server {
    listen       88;
    server_name  localhost;
    location / {
        # root   /usr/share/nginx/html;
        # index  index.html index.htm;
        proxy_pass http://127.0.0.1:8080;
    }

And now I can access Gitlab from myip:88.

Hope it will help you.

Pierre-Alain TORET
  • 1,244
  • 7
  • 14