Skip to content

Add custom listen_port to nginx config for reverse proxies

This was brought up in gitlab-org/gitlab-ce#1143. Suppose you want all users to access GitLab via:

http://mydomain.com

You may want to run GitLab behind a reverse proxy, so that all accesses from http://mydomain.com are proxied to http://localhost:8080.

To do this, you need to be able to support a custom listen port so that the external URL remains at http://mydomain.com but GitLab listens on port 8080.

To use this setting, just add:

nginx['listen_port'] = 8080

Merge request reports