I am running gitlab inside a docker which is mapped to port 8880 on my localhost. So I can access it using the URL
http://localhost:8880
But I have used apache proxy pass to create following mapping
localhost:8880 ------> localhost/gitlab
So that my users can access gitlab through localhost/gitlab. Everything seems to be working fine but the problem arises when the page is rendered. All the link in the page generated by Gitlab uses relative url like
This causes apache to redirect them to localhost/assets/... when clicked. Which results in 404 Error which is obvious as the resource path is incorrect. The link should have been generated as localhost/gitlab/assets/.... so that apache can map them correctly to localhost/gitlab/assets/...
I have tried using the Apache rewrite module, Nginx rewrite module but none of them worked. Is there anyway I can change the relative URL generated by gitlab?
Sorry this feature is not currently supported in gitlab. If you must use a relative url, consider using omnibus gitlab as it has support for relative urls.
When you send a request to localhost/gitlab, the apache server faithful forwards it to localhost:8880. But neither gitlab nor nginx know it is coming from a relative url, only apache does. This becomes a problem since the resource paths in gitlab are constructed with the fqdn - localhost:8880. And apache only modifies the header of the request to localhost/gitlab not the links and resources embedded in the request.