Cant access gitlab using domain behind nginx proxy

Hi,

I deployed gitlab in ubuntu and use nginx as reverse proxy. Gitlab was deployed using root access.
I followed the instruction here on how to setup nginx lib/support/nginx/gitlab · master · GitLab.org / GitLab · GitLab.
For the proxy pass mentioned in the above sample, i have changed to my ip eg. 192.168.x.x.

my gitlab.rb is:

external_url ‘http://gitlab.example.com

gitlab_rails[‘trusted_proxies’] = [‘nginx ip here’,‘ip’,‘2001:0db8::/32’]

web_server[‘external_users’] = [‘www-data’]

nginx[‘enable’] = true
nginx[‘listen_addresses’] = [‘0.0.0.0’, ‘[::]’]
nginx[‘listen_port’] = 80
nginx[‘listen_https’] = false
nginx[‘real_ip_trusted_addresses’] =[‘nginx ip here’,‘ip’,‘2001:0db8::/32’]
nginx[‘error_log_level’] = “debug”

registry_nginx[‘listen_addresses’] = [‘‘, ‘[::]’]
mattermost_nginx[‘listen_addresses’] = [’
’, ‘[::]’]
pages_nginx[‘listen_addresses’] = [‘*’, ‘[::]’]

when i curl gitlab server, i’m got sign in page which is correct. so since im using external nginx, i have set nginx[‘enable’] = false. when i curl, i received connection refused error.

using true or false, from nginx server access.log, the error is:

2024/03/20 10:57:43 [error] 1352#1352: *1 connect() failed (110: Unknown error) while connecting to upstream, client: , server: gitlab.example.com, request: “GET / HTTP/1.1”, upstream: “http://192.168.x.x:80/”, host: “gitlab.example.com”.

please guide me on how to rectify this?