Unable to use nginx as reverse proxy in kibana

I am unable to use the nginx as reverse proxy in kibana.

kibana dashboard is working fine on 172.25.1.x:5601
kibana service is working fine

server block in the /etc/nginx/nginx.conf are below:

server {
    listen *:80;
    server_name elk-logserver.com;
    location / {
    proxy_pass http://172.25.xx.xx:5601;


    auth_basic "test Property";
    auth_basic_user_file /etc/nginx/.htpasswd;

}
}

port 80 is open on kibana machine.
kibana and nginx are installed on the same machine.
nginx -t show the configuration is good.

but I am not able to access the kibana using the reverse proxy domain (elk-logserver.com).

any change that we need to do on the /etc/hosts file or in the kibana.yaml, do let me know.
Any inputs.

I think this needs a slash at the end: proxy_pass http://172.25.xx.xx:5601/;

its the same issue.

i tried to remove the server block and added a conf file under /etc/nginx/conf.d with the same content but still the same.

Did you try to connect with your Nginx IP address ?
It's the same issue ?

with ip address it is working fine.

So your Nginx configuration is fine, you have to add into the /etc/hosts of your "local computer" the following line:
IP_NGINX_ADDRESS elk-logserver.com

"local computer" means the computer that you are using to access the kibana server.