Cant access the site using url other than localhost when startup site using server.exe from Zip Deployment

I try to run the server.exe from the Zip Deployment in Azure VM
The site start and listen to http://localhost:5000.

  1. How to access the site using a public ip from external? I already enable the firewall of the OS and Azure for port 5000-5001.
  2. How to configure the server.exe to listen to other port (example port 8080). I tried to modify server port in the Application Settings but the deploy zip still listen to port 5000-5001.

https://ngrok.com/

ngrok http http://localhost:5000 -host-header="localhost:5000"

Also this blog post lists all ways to set the URL to which an ASP.NET Core application listens: 5 ways to set the URLs for an ASP.NET Core app

By default all ASP.NET Core applications listen on localhost:5000.