Our old BitBucket server had a URL like this,

And, we're wanting to move to GitLab with a DNS switch which has a different URL-convention namely

The /scm/ is what I'd like to fix. Is there a way to rewrite URLs through configuration of the GitLab server such that I can make

Redirect to

Note, I know I can change the "Custom Git clone URL for HTTP(S)" and "Replaces the clone URL root" under GitLab's admin/application_settings/general.

1 Answer 1


GitLab omnibus and self-managed installs ship with NGINX which is exposed and documented here,

You basically edit the gitlab.rb file, edit nginx['custom_gitlab_server_config'] and then rerun gitlab-ctl reconfigure to regenerate the nginx confs and restart nginx.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.