404 not found with relative url + reverse proxy

I’m trying to set up a fresh omnibus installation of gitlab-ee (and I’ve never done so before). The setup I want is to run gitlab on an internal server (let’s call it serverA), using all the bundled components including nginx, and use a reverse proxy on an apache server which is visible outside our network (“serverB”). Because apache is serving an existing website, I need to use a relative url. Also I need to serve https, not http.

So on serverA I installed gitlab-ee and set external_url to “https://serverB/gitlab”. I had already set up the reverse proxy on serverB. When I navigate to https://serverB/gitlab, I get the gitlab 404 Not Found page. In the log file /var/log/gitlab/nginx/gitlab_error.log, I get messages like:

2019/05/17 11:48:36 [error] 3915#0: *520 “/var/opt/gitlab/nginx/html/index.html” is not found (2: No such file or directory)

Sure enough, that index.html does not exist, but I don’t see errors in gitlab-ctl reconfigure that might explain why it’s not created.

So I have two questions: (1) is my desired configuration supported; and (2) what can I do to track down the cause of this 404 error?

Did you find a solution?