Hi Hugo, sorry for the delayed reply.
As you say i move the PasswordFile setting to a .hiawatha file inside the folder i want to protect with authentication and place the return of wigwam -b username password inside a .password file. It is working correctly now
*For anyone in the future with the same question i just note that both files must have www-data:www-data as owner:group, with root:root it is not working.
Thank you very much for another time