I see, my guess is that the path is in an nginx file somewhere. Could be the fpm config, but unlikely.
Nextcloud will look in the root of the nextcloud install for config/config.php
So unless you have been hacking the code, I think it’s nginx config
Your very welcome