1

I have created username.gitlab.io repo with index.html and 404.html pages, which have to be deployed automatically.

After deploy if I open in browser address username.gitlab.io it shows well index.html page and if I open username.gitlab.io/404.html it shows well too.

BUT!!

If I try to open username.gitlab.io/not_existing_file it shows internal GitLab error page, but not mine.

At the same time:

If I create repo with reponame and same content, it serves 404.html page well on /reponame/not_existing_file from that repo.


What am I doing wrong?


Internal GitLab error page says, that: ..you don't have the necessary permissions.., but the repo reponame has the same permissions (and settings at all) as username.gitlab.io.

Has anyone faced this issue?

1 Answers1

1

The "Creating a custom 404 page for your GitHub Pages site" dos mention a /404.html.

And yet, gitlab-pages issue 183 points to error-page-demo/error-page-demo.gitlab.io which has the same issue on a non-existing file, even though the error-page-demo.gitlab.io/404.html does exist.

This is still pending, with MR 130 still open.


Update Nov. 2021: exaucae mentions in the comments that MR 130 has been merged along with MR 263 and fixed.

So that's now possible.

In fact, MR 263 will allow namespace domains to serve custom 404.html files for public projects.
It will also allow serving the same custom error page for private projects when there is a parent namespace domain and is public.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • UPDATE: MR 130 has been merged along with MR 263(https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/263) and fixed. So that's now possible. In fact, MR 263 will allow namespace domains to serve custom 404.html files for public projects. It will also allow serving the same custom error page for private projects when there is a parent namespace domain and is public. – exaucae Nov 22 '21 at 10:07
  • @exaucae Great news, thank you! I have included your comment in the answer for more visibility. – VonC Nov 22 '21 at 10:14
  • Roger that. Thank you! – exaucae Nov 22 '21 at 12:34