curl output shows different IP addreses:
looks you connect with office… through public IP but use private rfc1918 IP address for nextcloud… maybe you created local DNS record and use splitbraindns to access your Nextcloud domain? definitely the second connection fails for some reason… likely you don’t hit the reverse proxy but some other system which doesn’t listen on this address (or you directly hit Nextcloud container behind the reverseproxy).
you can look at this post how to avoid internet loop and make your containers connect directly to the reverseproxy using public DNS names (call it “splitbraindns for docker”)
btw: you better use https://nextcloud.mydomain.tld/status.php it is unauthorized and lightweight - you see immediately if it works