title: how to access endpoints from a remote machine
body: <p>I am running an ASP.NET Core 2.2 API on a Ubuntu 18.04x64 server that has a public IP address. It was developed on a Windows machine, and while running on IIS, all the endpoints work fine with the localhost. Once it is on the ubuntu server running using the dotnet command, I can't access the endpoints from my windows machine via the public IP address.</p>
  
  <p>I tried adding this to my Program.cs file:</p>
  
  <pre><code>public static IWebHost BuildWebHost(string[] args) =&gt;
       WebHost.CreateDefaultBuilder(args)
       .UseStartup&lt;Startup&gt;()
       .UseUrls("http://*:5000")
       .Build();
  </code></pre>
  
  <p>As well as</p>
  
  <pre><code>"WebAPI": {
        "commandName": "Project",
        "launchBrowser": true,
        "launchUrl": "api/values",
        "applicationUrl": 
        "https://localhost:5001;http://localhost:5000;http://*:5000",
        "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"
        }
  </code></pre>
  
  <p>to my launchSettings.json</p>
  
  <p>When I go to the public IP address in my browser, I get the welcome to nginx webpage, but when I go to /api/ping I get a 404 error. What else am I missing?</p>