Recently, I installed this amazing GitLab CE and it works just I expected.
I opened my GitLab within localhost with bundled nginx and exposed it with external nginx, which is installed in host os.
Most features are just works find. But, when I try to create a new snippet it redirects me to localhost and not public URL I configured.
## nginx config file
Configurations above makes GitLab to open its server within localhost and external nginx to expose it to the public via git.example.com.
And it suppose to do the same thing with snippets.
If I create snippet in git.example.com it should redirect me to git.example.com, but it redirects me to locahost:8080.
What am I missing? Is further config needed?
I suppose the reverse proxy configs in external nginx itself is not the problem since it works just fine with regular repositories.
Your Gitlab needs to use config options from the Gitlab docs here: NGINX settings | GitLab mostly this particular section (using a non bundled web server): NGINX settings | GitLab
Also I expect you shouldn’t be using localhost in your external_url as well. It should normally be the DNS name/fqdn of your machine/server. In fact if you did this, then you wouldn’t need an external NGINX.
I setup with provided document and now it does not redirect to localhost but to the socket lol
*sy-l340 is the name of my local machine.
Where did I went wrong?
This is what I found:
I guess this file have something to do with snippets’ url.
And I think I need modify some configs from gitlab.rb like this.
This one is not for snippets’ though.
This may be the answer but I don’t know what exactly should I do.
Now that I modified configurations below, it works like a charm!
And I can see the actual config file, which is gitlab.yml, is also have changed.
How on earth didn’t I come up with this such simple idea?