Configure Gitlab listing port in gitlab.rb not using external_url

Hi there,

I need Gitlab (it’s nginx) listening to a custom port - but I don’t want to configure it in external_url ‘http://url:port’.

The reason: I use Gitlab in a network that is secured by reverse proxies (I don’t have access to them, it’s complicated in my company to get configurations there) - and all traffic to gitlab has to pass this proxies. When I use the external_url for configuration, the client has problems with profile picture as they are included in the userinterface by using the external_url.

Example:
I open http://gitlab.mycompany.com in my Browser. The connection terminates at the company proxy, which opens a new connection to the IP-Adress and port, that is configured (in the proxy config) for my gitlab-machine: 10.x.x.x:8443.

In gitlab.rb i configured the external_url ‘http://gitlab.mycompany.com:8443’, which is given to the browser in the URL of the profile picture. This doesn’t work.

My Solution Idea:
I want to configure my external_url as 'http://gitlab.mycompany.com and set the listing port of nginx to 8443. So the path to the picture is OK.

For better understanding I drew a image: figure

Does anybody know how to get this configuration through gitlab.rb?

Thanks in advance,

Christian