Relative url does not extend to repository links

I installed GitLab Omnibus version 12.2.1-ee on CentOS 7.6.1810

I got it working on an external url set to (reached via VPN) and migrated a couple of repositories to it.

After that, I realized I needed to change the external url to I did that by editing the line specifying the external url in gitlab.rb in /etc/gitlab.
After gitlab-ctl reconfigure and gitlab-ctl restart, I was able to log into the new url and see my projects. However, the links the projects are missing the /gitlab in the url. That is, the links are
instead of

Clicking on the links gives me a 404 error. If I manually enter the address
I go to the repository and all is well.

Help! How do I fix the links to the repositories??