Reverse-proxying relative URL to root URL results in 404 errorpage


since nobody picked up my posted issue ( I hope to find help or hints from this forum

Our GitLab (community version) instance runs on an internal server as https://internal.gitlab.server while its external URL is In-between sits a proxy. However when we configure the system according to, then accessing the external URL results in a 404 error.

The current workaround solution consists of external_url being https://internal.gitlab.server with the proxy being configured for URL rewriting:

  <Location /gitlab/>
    # SetOutputFilter INFLATE;proxy-html;DEFLATE
    # LogLevel debug
    ProxyHTMLEnable   on
    ProxyHTMLExtended on
    ProxyHTMLMeta     on

    ProxyHTMLLinks  a          href
    ProxyHTMLLinks  area       href
    ProxyHTMLLinks  link       href
    ProxyHTMLLinks  img        src longdesc usemap
    ProxyHTMLLinks  object     classid codebase data usemap
    ProxyHTMLLinks  q          cite
    ProxyHTMLLinks  blockquote cite
    ProxyHTMLLinks  ins        cite
    ProxyHTMLLinks  del        cite
    ProxyHTMLLinks  form       action
    ProxyHTMLLinks  input      src usemap
    ProxyHTMLLinks  head       profile
    ProxyHTMLLinks  base       href
    ProxyHTMLLinks  script     src for
    ProxyHTMLLinks  meta       content

    ProxyHTMLURLMap https://internal.gitlab.server:443/ /gitlab/
    ProxyHTMLURLMap https://internal.gitlab.server/     /gitlab/
    ProxyHTMLURLMap http://internal.gitlab.server:80/   /gitlab/
    ProxyHTMLURLMap /                                   /gitlab/

    ProxyPass          https://internal.gitlab.server:443/
    ProxyPassReverse   https://internal.gitlab.server:443/
    ProxyPass          https://internal.gitlab.server/
    ProxyPassReverse   https://internal.gitlab.servere/
    ProxyPassReverse   https://our.internal.proxy/

This is ugly, badly maintainable and still leaves us with lots of broken links (icons images) and non-working functionality (no project graph, cannot add users to projects ecc. ecc.) when we use GitLab through However it works when accessing GitLab through https://internal.gitlab.server but this is not possible for external coworkers…

If you have solved this problem yourself or if you have an idea on how to properly configure this setup, then your input is highly appreciated :slight_smile: