OK, I don't know your network.
I'll just assume it's set up something like this.
- 192.168.1.1
- 192.168.1.10
- 192.168.1.50
red) To reach the nextcloud.host.mydomain.fr
from the WAN, you have configuard a NAT. WANIP:445 -NAT-> 192.168.1.10:445
on your WAN interface
green option 1) You have configuard nextcloud.host.mydomain.fr
to 192.168.1.10
on your PiHole
Then all clients who have the PiHole as DNS server in the internal network can reach nextcloud.host.mydomain.fr
on 192.168.1.10
green option 2) You have configuard a NAT from intern WANIP:445 -NAT-> 192.168.1.10:445
on your LAN interface.
Then clients can then connect from LAN through the NAT connection when you open nextcloud.host.mydomain.fr:445
witch point to your WANIP.