Gitlab pages always shows 404 error when opening artifacts

We use a self hosted gitlab ce v16.1.2 (Omnibus-Installation on Ubuntu 22.04) for our project repository. The bundled nginx is disabled, because there are other services running that also use the webserver. nginx configuration is this one taken from gitlab recipes

Now I want to view the generated html reports from phpunit,, pa11y-ci, etc. that are stored as artifacts without downloading them first. So I actived gitlab pages, but everytime I click on an html file in the artifacts browser I get the message, that I’m redirected to an external url and when I click on the link I’m getting a 404 error.

gitlab runs under, pages url is

Displayed Artifacts-URL on pages looks like this:

I’ve enabled gitlab pages in /etc/gitlab/gitlab.rb with access control and executed gitlab-ctl reconfigure without any errors. Pages are enabled in the settings for the project, the project is non-public.

These are all changes I made to the default gitlab configuration in gitlab.rb:

grep "^[^#;]" gitlab.rb
external_url ''
gitlab_rails['time_zone'] = 'Europe/Berlin'
gitlab_rails['trusted_proxies'] = ['', '']
web_server['external_users'] = ['www-data']
nginx['enable'] = false
pages_external_url ""
gitlab_pages['enable'] = true
gitlab_pages['access_control'] = true
alertmanager['flags'] = {
  'cluster.advertise-address' => "",

The phpunit-job looks like this:

    stage: test
        - branches
        - docker exec web ci/
        - grep -o -a -m 1 -h -E "[0-9]+\.[0-9]+% covered" tests/.phpunit-coverage/report/index.html

    coverage: '/^\s*\d+.\d+\% covered/'
        when: always
            - tests/.phpunit-coverage/
        expire_in: 1 week

We only want to browse the artifacts report, do I nevertheless have to insert a pages stage / job for displaying artifacts via pages?

I’ve activated verbose logging for pages:
gitlab_pages['log_verbose'] = true
but no useful messages show up

Currently I’m running out of ideas, what could be wrong in my setup, so any help would be appreciated.

Solution: I missed to copy the gitlab-pages configuration file from gitlab to nginx. After I copied /var/opt/gitlab/nginx/conf/gitlab-pages.conf there, adapted it to our needs and activated it, everything now works as expected.