6

I'm having some major issues with a gitlab instance running on an osx (10.11) server. This is is self-hosted gitlab-ce built from source. It was working fine up until last week when I tried to upgrade from version 8.5 to 8.6. I ended up rolling back to 8.5 after some build issues, but something in the configuration was broken in the process.

Currently, I can access my gitlab site if I open it in a browser running on the osx server if I explicitly include the nginx port. If I try to access it from a remote browser, with or without an explicit port, I get a 'This site can't be reached' error. I have tried everything I can think of to git this back in working order and nothing seems to help. There are so many potential config files and options I don't even know where to look at this point.

Any help would be appreciated.

Update: With some additional trial and error I was able to access my gitlab locally without specifying the port. Unfortunately however, remote access remains stubbornly broken. What I really need is an example of a working NGINX config for gitlab on osx.

Update 2.0 The remote access issue turned out to be a firewall problem. Fixing that has brought me full circle though. I can access gitlab be specifying the port, but I can't figure out how to set up a proxy to use the default web port (80). I understand that binding to that port requires root access, but I get 'permission denied' errors, even when I use sudo.

Update the third As suggested I have posted another question here: https://serverfault.com/questions/960051/nginx-unable-to-bind-to-port-80-in-osx-server since my issue has moved beyond the scope of the original question.

pbuchheit
  • 1,371
  • 1
  • 20
  • 47
  • I guess your Update 2.0 deserves its own question but anyways, to setup a nginx proxy read this document, it should help and give you the basic idea https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ Otherwise i would recommend to open a new question, how to use a nginx proxy to get around occupied default ports, as this question has been answered and you are now able to access your selfhosted gitlab with the non default port – xzesstence Mar 25 '19 at 14:34

2 Answers2

2

you only have to include the nginx port if you are not running on a default port like 80 for http and 443 for https

so you might want to change your config file and set it to a default port there and after that run

gitlab-ctl restart

to get it into effect

cheers

xzesstence
  • 679
  • 6
  • 19
  • Thanks, but due to other applications running, I can't use port 80 – pbuchheit Mar 13 '19 at 17:35
  • then depending on your webserver try using a virtualhost as proxy, im using this setup in production and works good. can you please mark as an answer to your question anyways? thanks – xzesstence Mar 13 '19 at 18:06
  • Unfortunately, even if I could fix the port issue with a virtual host, that only solves half the problem, and the less important half at that. The bigger issue is that gitlab cannot be accessed remotely. – pbuchheit Mar 13 '19 at 21:00
  • ok this is not clear in your question >> Currently, I can access my gitlab site if I open it in a browser running on the osx server and only if I explicitly include the nginx port. If I leave out the port number or if I try to access it from a remote browser, I get a 'This site can't be reached' error. << so i understood, you can reach it from remote by adding the ports... so please fix your question or mark my answer as correct as its the correct answer to your written question. check your port forwarding in your firewall. there can be many reasons so you need to provide more informations – xzesstence Mar 14 '19 at 11:25
  • ah and by the way, if you have full server control, you could use docker and the official gitlab-ce docker image ;) im using this for my own purposes and its great and simple – xzesstence Mar 14 '19 at 11:28
  • Ok, I din't realize that was not clear. As far as docker goes, I already ruled that out for performance reasons. When it was working properly, our gitlab server was already taxing the server. – pbuchheit Mar 14 '19 at 13:19
0

Gitlab has a guide for all of this to be hosted on docker.

If you'd like to give the docker example a try the guide can be found here

Tomos Williams
  • 1,988
  • 1
  • 13
  • 20
  • 1
    Unfortunately, I'm pretty sure this server doesn't have the resources to spare to allow me to run a virtual environment like Docker. – pbuchheit Mar 25 '19 at 13:18
  • Ahh ok, if you do still want some help, it might be worth adding your nginx files so we can have a look – Tomos Williams Mar 25 '19 at 13:42
  • this has been discussed on mar, 14 at 11:28 and he already told that same answer.. see my answer to his question – xzesstence Mar 25 '19 at 14:40