Gitlab Pages Multiple Domains not Custom Domains

Goal:
I would like to be able to address my pages site on both:

  1. http://groupname.myserver.domain.net/jekyll
  2. http://groupname.myserver/jekyll

Problem:
My server is available on both http://myserver and http://myserver.domain.net.
When I enable pages with ‘pages_external_url “http://myserver.domain.net”’,
I can access my page at http://groupname.myserver.domain.net/jekyll as expected;
however http://groupname.myserver/jekyll results in a 404 error.

Troubleshooting:
Swapping the pages_external_url to the short version means the short pages url resolves correctly,
however the long format now results in a 404.
-This serves to prove that the wildcard DNS resolution is working on both the short name and the FQDN.

I tried to pass a wildcard URL into pages_external_url.
-This was rejected by the ‘gitlab-ctl reconfigure’ process as the entry did not resolve to a valid URL.

I tried to add in an additional nginx server_name directive,
‘pages_nginx[‘custom_gitlab_server_config’] = “server_name ~^(?.*)\.myserver$;”’,
resulted in the same 404 error.
-This is not just an nginx issue, but also another part of the system.

Thanks in advance,
Greig

2 Likes