I'm installing Elasticsearch on my Ubuntu 18.04 under nginx for my Magento 2.3.1. Reading the official documentation, I find the following link, and says that to configure elasticsearch with nginx on the same server I must configure a proxy on my nginx, but I am not clear if this is necessarily necessary or not, can someone help me understand the reason and How to do it optimally?
https://devdocs.magento.com/guides/v2.3/config-guide/elasticsearch/es-config-nginx.html