Help setting up the clearlinux CGit Docker container

Hey there,
I recently started setting up a server, and decided on using containers. I’m now in the process of migrating from containerless cgit to the clearlinux CGit docker container, and I’m facing a few issues.
I want to access cgit via port 8000 on my machine. In caddy, I’m simply using reverse_proxy localhost:8000 when accessing /git*. This worked flawlessly previously, but now it seems to collide with the webserver in the docker container.

This is my config:

cache-scanrc-ttl=1
css=/cgit-data/cgit.css
logo=/cgit-data/cgit.png
favicon=/cgit-data/favicon.ico
footer=/cgit-data/footer.html
virtual-root=/git/

readme=:README.md
readme=:readme.md
readme=:Readme.md
readme=:README.txt
readme=:readme.txt
readme=:Readme.txt
readme=:README
readme=:readme
readme=:Readme

mimetype-file=/etc/mime.types

root-title=Git Repositories
root-desc=Repo List
robots=noindex, nofollow

enable-commit-graph=1
enable-log-linecount=1
enable-http-clone=1
enable-index-owner=0
side-by-side-diffs=1

enable-git-config=1
scan-path=/var/www/git/

When I open the webserver that I expected to be cgit, I’m presented with a choice:

Index of /

    git/
    html/

html is just the webserver, and git is a static fileserver that serves all the repos inside of the folder that I set cgit to use for repos.

I only get to access the actual cgit interface, when I use /cgit, even though I used the virtual-root option in the cgit config to map it to /git.

Now, how can I achieve what I want to do (open cgit when opening /git, and not some weird fileserver)? Why does the fileserver even exist if all you want is the cgit interface? How can I make sure that the fileserver is not accessible from the outside (I want to hide some repos, and I want those to be hidden as they contain important and sensitive information. I don’t want there to be a way to access them, but maybe the best option is to just keep them outside of cgit’s reach)

Apparently there is a really easy way to do this. I grabbed the build files for the container and changed a single line in the httpd config file:

- ScriptAlias /cgit /usr/libexec/cgit/cgi-bin/cgit
+ ScriptAlias / /usr/libexec/cgit/cgi-bin/cgit/

(Mind the trailing slash! This is important to prevent ending up with e.g. cgitrepo.git when it should be cgit/repo.git)