I'm encountering a very weird issue with gitlab-ce installed on a server with ubuntu server (I've tried this with ubuntu server 16.04 and 17.04) , which runs on my local network. I'm using gitlab with apache2, with the following set up:
My /etc/gitlab/gitlab.rb file looks as follows:
external_url "http://localhost:17391"
My apache virtualhost configuration file for the site (let's call it 'example.com') looks like this:
<VirtualHost *:80>
ProxyPass / http://localhost:17391
ProxyPassReverse / http://localhost:17391
</VirtualHost>
Essentially I'm taking the whole traffic apache is receiving and redirecting it to nginx. I can view 'http://example.com' in a web browser (I have to access the site through a proxy of course, because the server is running on the same local network as my pc) and everything works fine (signing in, viewing repositories, etc.). As soon as I try to clone into a repository on my pc by running the following command in a terminal I get an error message:
$ git clone http://example.com/user/repoName
Cloning into repoName...
fatal: repository 'http://example.com/user/repoName' not found
But when I try the same with the local ip of the server (let's say 192.168.1.100) instead of the domain it seems to work:
$ git clone http://192.168.1.100/user/repoName
Cloning into repoName
Warning: redirecting to http://192.168.1.100/user/repoName.git
remote: counting objects: 3, done
remote: total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done
So I thought that the reason it doesn't work might be that I can't access the server through the domain when I'm on the same local network.
Here is the weird part though:
When I try the exact same set up, but instead of port 80, apache listens on another port, 17392, both commands clone into the repo successfully.
Thank's for any help in advance!