Excerpt from documentation for setting up GitLab Pages with wildcard DNS entry: https://docs.gitlab.com/ee/administration/pages/#wildcard-domains
external_url "http://gitlab.example.com" # external_url here is only for reference
pages_external_url "http://pages.example.com" # not a subdomain of external_url
pages_external_url should not be a subdomain of external_url. But why is that, since there are no problems doing it that way.
pages_nginx['redirect_http_to_https'] = truewith certificate/key path configured throughpages_nginx['ssl_certificate']andpages_nginx['ssl_certificate']results in thegitlab.example.comcertificate being used for test-repo.pages.example.com. Effectivly preventing usage of HTTPS for Pages, except you have the appropiate SANs in the gitlab.example.com certificate. At least these are my findings so far.