[ProxyPassReverse][1] is meant to rewrite HTTP `Location` headers that are outbound (i.e. HTTP redirects).  Because you have `ProxyPreserveHost On` set apache will pass the `Host: gitlab.example.com` HTTP header to the app server located at `127.0.0.1:8080`.  What many app servers do is they'll respect the `Host` REQUEST header and therefore give the same `Host` in the response header.  What that means for redirects is that the app server will pass back the `Location` header as `Location: http://gitlab.example.com:8080` instead of `Location: http://127.0.0.1:8080`.  If you would like to avoid that from happening then you'll need to set `ProxyPreserveHost Off`.  I didn't change it from the original config because I wasn't sure how GitLab would behave.  GitLab behaves just fine with the current config but you just have to rewrite the outbound `Location` headers.

[1]: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse