Hi @Aveeva ,
After changing the hosts file. Did you restart your server? If not please restart it and clear the magento cache as well.
Also check below link for configuration. Hope this helps you.
https://devdocs.magento.com/guides/v2.4/install-gde/prereq/nginx.html
Thanks!
Problem solved! Click kudos & Accept as Solution!