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?
Asked
Active
Viewed 1,542 times
0
-
I guess you have to disable the bundled nginx server like you did and add a new server in your Nginx conf file on another port proxying to the gitlab app. What was wrong with that ? – Pierre-Alain TORET Nov 01 '15 at 09:41
-
I,m not good with Nginx can you tell me how to do that please – Muhamad Bhaa Asfour Nov 01 '15 at 10:10
1 Answers
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.
![](../../users/profiles/144774.webp)
Pierre-Alain TORET
- 1,244
- 7
- 14
-
Thank you this worked as expected, i stopped the bundled server and added new file in `/etc/nginx/sites-available` with this configuration and Gitlab is working – Muhamad Bhaa Asfour Nov 01 '15 at 13:36
-
Perfect :) i see you're running debian. It's organised a bit differently there. Next time don't hesitate to mention it! – Pierre-Alain TORET Nov 01 '15 at 22:00