Nginx and hostname issue

in this thread (https://forums.docker.com/t/nginx-cannot-access-files-from-wordpress-container-and-presents-a-403/143953/7), I think you’re answered also and the OP used nginx and not a reversed proxy. So why it worked for him and not for me ?
also if you check the docker-compose.yml file you will see he used variable for hostname in nginx container.
So why my situation is different than his ?
we have the same purpose and using the same container technologies (php/wordpress/mysql/phpadmin)