title: ASP.Net Core application service only listening to Port 5000 on Ubuntu
body: <p>I am trying to host an ASP.Net Core MVC application (https redirection is enabled) on Ubuntu server, using Nginx as a reverse proxy. I have created and installed a local SSL certificate using OpenSSL. When i run my application using dotnet CLI it listens on both <em><a href="http://localhost:5000" rel="noreferrer">http://localhost:5000</a></em> &amp; <em><a href="https://localhost:5001" rel="noreferrer">https://localhost:5001</a></em>, and i am able to access it on web using https (http requests are being redirect to https by Nginx).</p>
  
  <p>The problem is when i try to run the as a service, it only listens on <a href="http://localhost:5000" rel="noreferrer">http://localhost:5000</a>.</p>
  
  <p>Here's the *.service file :</p>
  
  <pre><code>[Unit]
  Description=Test ASP.Net core web application service.
  
  [Service]
  WorkingDirectory=/home/ubuntu/MyAppFolder
  ExecStart=/usr/bin/dotnet/home/ubuntu/MyAppFolder/MyApplication.dll
  Restart=always
  # Restart service after 10 seconds if the dotnet service crashes:
  RestartSec=10
  SyslogIdentifier=MyApplication
  User=www-data
  Environment=ASPNETCORE_ENVIRONMENT=Development
  Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
  Environment=ASPNETCORE_HTTPS_PORT=5001
  Environment=ASPNETCORE_URLS=http://localhost:5000;https://localhost:5001
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p><strong>Environment details</strong> : ASP.Net Core 2.1.1, ASP.Net Core SDK 2.1.3, Nginx 1.14, Ubuntu 16.04 </p>