[pages] Custom domain work on a separate server?

Hello everyone,

i have a simple question:
does the custom domain run on a separate server?

if yes, HOW ?
i tried many time…
I first modify the gitlab.rb on my main gitlab server
https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/#for-subdomains

pages_external_url “http://mygitlabserver.com
nginx[‘listen_addresses’] = [‘IP of mygitlabmain’]
pages_nginx[‘enable’] = false
gitlab_pages[‘external_http’] = [‘IP of mypagesserver:80’]

Gitlab-ctl reconfigure. after i configured my domain, the custom domain redirects me to the default page of the page server and not to the project page

Soo … i tried to modify that on gitlab pages server (gitlab.rb)
But i have this error:
for Nginx

2021-03-02_10:13:42.36775 2021/03/02 11:13:42 [emerg] 25437#0: bind() to IPofMyGitlabMain:80 failed (99: Cannot assign requested address)

and Gitlab pages

2021-03-02_10:13:42.36775 2021/03/02 11:13:42 [emerg] 25437#0: bind() to IPofMyPagesServer:80 failed (99: Cannot assign requested address)