WebDAV cannot connect with hosts file pointing out to server ip

Hello, im facing a problem with webDav from nc. I ping to my url nextcloud and it is getting a route out of my server, it should be direct from this server. So I edited the windows host file connecting the nextcloudsample.com.br to my ip server address. After that, whenever i try to connect to my webDAV an connection error apears, saying it was not possible to connect with webDAV. Is there a easier way to make this connection direct from my server?

Nextcloud version 21.0.5
Operating system and version CentOS 7

Steps to replicate it:

  1. Edit the windows hosts file pointing out for the server ip addres
  2. Try connect to webDAV

thank you in advance.

I think you must solve the problem with not manipulating your windows hosts file.
Please undo the windows manipulations and post details to the real problem e.g. configuration, routing, logs, …

It solves the problem, but webDAV gets too slow not connecting from the server directly