How to reverse proxy gitlab with 2 server?

Hi, i have two private server like this:

  • 10.20.31.21 (Nginx) -> nat to IP public 123.123.123.123
  • 10.20.31.22 (Gitlab)

How config in GitLab server, and for a reverse proxy to Gitlab?

I have to try, to proxy_pass, but cannot connect. If I access to IP public always redirect to private IP Gitlab.

Simplest way is don’t. Gitlab really does not play nice with proxies. It really should, and why it has a bundled nginx itself is beyond me. It just break stuff. Hey ho.

I don’t really like it but the reverse proxing was just a nightmare and I gave up in the end.

Just run your gitlab install on a different port. Then on your router just port forward to the gitlab port. Do the same with ssh as well.