Using an IP directly seems to work, since most networking utilities accept either: just add external_url "http://127.0.0.1" to /etc/gitlab/gitlab.rb and run sudo gitlab-ctl reconfigure.
What does not work is adding the /gitlab root path to the external_url: gitlab-ctl says:
RuntimeError
------------
Unsupported external URL path: /gitlab
Serving from a relative URL root seems to be simply not implemented on Omnibus GitLab (since no template variable is inserted there).
You could work around that by modifying all the required configuration files manually as explained in the comment on gitlab.yml, but that would really be a lot of manual work and those configs would get overwritten if you reconfigure, so I recommend you request the feature on the GitLab forum and send a pull request implementing that.