using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; namespace contact { public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseUrls("http://*:3002")//only this port works with nginx proxy //.UseUrls("http://localhost:3002")//this doesn't work with nginx proxy .UseStartup(); } }