Gitlab behind nginx

How to configure gitlab so that I can access it via nginx.
Gitlab installed with http://gitlab.abcd.com (this is not accessible outside of this VM. Maintained this hostname in /etc/hosts)

Nginx running at port 80 and its URL is http://gitlab.mydomain.com.

If I access git clone/commit/pull http://gitlab.mydomain.com/gitlab/…, nginx must redirect this URL to http://gitlab.abcd.com/… and serve the request.

Is this possible? If yes, how to do this?