Solved: Setting up a reverse proxy for .well-known

Im setting up a matrix home server on a different machine

One of the instructions requires to setup some info in ./well-known/matrix/*

[https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-well-known.md#option-3-setting-up-reverse-proxying-of-the-well-known-files-from-the-base-domains-server-to-the-matrix-server](https://Link im following)

I’m gonna use option 3 from that link

however, i heard that Nginx config gets changed on each update of miab

is there a way to add this configuration to Nginx without it getting removed?

my other option is to give access of the root domain to the matrix homeserver

tldr: i want to reverse proxy example.com/.well-known/matrix/* (controlled by miab box) to matrix.example.com/.well-known/matrix/*

SOLVED

found this, why is this feature undocumented?