Pages under a single domain with namespaceInPath not working

Problem to solve

Hello world!
I have a on-premise, bare-metal kubernetes cluster on which I’m running Gitlab CE v17.11.2. I’ve installed it using helm (chart version 8.11.2). I want to enable gitlab pages without setting up a wildcard DNS domain, and I’m running into issues.

I have a group (group) with a repo (repo), which lives under git.example.com/group/repo. I want their pages to live under pages.example.com/group/repo.

My gitlab installation is reachable under https://git.example.com; I want my gitlab pages to live under https://pages.example.com. I have set up DNS A records for these (pointing to the same IP, at which a k8s Gateway is listening). I have HttpRoutes (rather than ingresses!) set up. git.example.com routes to the gitlab-webservice-default:8080 service; pages.example.com routes to the gitlab-gitlab-pages:8090 service. I’m reasonably sure these routes are working as intended.

Relevant Helm values

These are the relevant helm values. I installed gitlab using helm upgrade -n gitlab gitlab gitlab/gitlab --version=8.11.2 -f gitlab-values.yaml

global:
    hosts:
        https: true
        pages:
            names: pages.example.com
    pages:
        enabled: true
        namespaceInPath: true
        accessControl: false
gitlab:
    pages:
        logVerbose: true

Repo config

There is a CI job to build the pages (actually, just grab the html files from the public folder):

image: busybox

pages:
  stage: deploy
  script:
  - echo 'Nothing to do...'
  artifacts:
    paths:
    - public
    expire_in: 1 day
  rules:
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

This seems to work: It kicks off a pipeline in which the pages job finishes pretty much instantly. It then starts a pages:deploy, which also finishes successfully.

Pages logs

In the web UI, under deploy/pages it happily asks me whether I would like to use a unique domain (if yes, it generates https://pages.example.com/repo-4d6c12; if no https://pages.example.com/group/repo). However, for both it gives me a 404.
The pages logs say the following

{"content_type":"text/html; charset=utf-8","correlation_id":"90a7613a-4707-450e-855f-8f4fa14b2f27","duration_ms":0,"host":"group.pages.example.com","level":"info","method":"GET","msg":"access","pages_https":true,"proto":"HTTP/1.1","read_bytes":1622,"referrer":"","remote_addr":"192.168.1.4","remote_ip":"192.168.1.4","status":302,"system":"http","time":"2025-07-07T16:06:53+02:00","ttfb_ms":0,"uri":"/repo", "user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36","written_bytes":65}
{"content_type":"text/html; charset=utf-8","correlation_id":"6293844f-22bb-438f-aae8-a84060193b87","duration_ms":0,"host":"group.pages.example.com","level":"info","method":"GET","msg":"access","pages_https":true,"proto":"HTTP/1.1","read_bytes":1623,"referrer":"","remote_addr":"192.168.1.4","remote_ip":"192.168.1.4","status":404,"system":"http","time":"2025-07-07T16:06:53+02:00","ttfb_ms":0,"uri":"/repo/","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36","written_bytes":3725}

Note that it’s looking for the domain group.pages.example.com, which indeed does not exist.

Versions

Please add an x whether options apply, and add the version information.

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Versions

  • GitLab: 17.11.2

Everything I could find so far indicates that setting namespaceInPath: true does what I need to, but it doesn’t seem to actually work.
Any help or advice would be much appreciated. I’d also be happy to provide more config details upon request.

Ok, user error. There needs to be a home.html or index.html file :man_facepalming: