All web ui pages return 404 after upgrading to Gitlab 18.5.0
Summary
After upgrading to GitLab 18.5.0 (Docker instance), we started getting a GitLab 404 page on all URLs, although Git operations (clone/push/pull) still work fine.
Details
After some investigation, we found that the recent NGINX configuration refactoring enforces the server_name setting to match the FQDN specified in the GitLab configuration.
However, in our environment we’ve been accessing GitLab through several different hostnames, which has worked fine for years.
Examples:
- gitlab.example.com
- gitlab.example.lab
- 
gitlab(internal DNS)
Our configured FQDN is gitlab.example.lab.
After the upgrade, only gitlab.example.lab (the configured FQDN) works correctly — all other hostnames return a 404 page.
Workaround
If we place another front-end NGINX instance that listens on multiple domains and configure:
proxy_set_header Host gitlab.example.lab;
proxy_pass http://gitlab;then all domains can access GitLab.
However, users are still automatically redirected to gitlab.example.lab.
Expected Behavior
Before the upgrade, GitLab was accessible from all configured hostnames without redirection or 404 errors.
Actual Behavior
After upgrading to 18.5.0, only the FQDN hostname works; all other hostnames return a GitLab 404 page.
Environment
- GitLab version: 18.5.0 (Docker)
- Deployment type: Docker container