title: asp.net core mvc app on linux can't be reached from outside the server
body: <p>It's an asp.net core 2.1 mvc application hosted on an ubuntu 18.04 with Nginx. UFW is disabled.
  The web application was working in the beginning. When I found out it's down it has been some time.</p>
  <p>Using a browser I go to thesite.com, the browser was redirected to
  <a href="https://www.thesite.com:5001/" rel="nofollow noreferrer">https://www.thesite.com:5001/</a> with error:</p>
  <blockquote>
  <p>This site can’t be reached</p>
  <p>ERR_CONNECTION_TIMED_OUT</p>
  </blockquote>
  <p>The port number was attached so it seems at least an outside request can reach Nginx.
  Then inside the box when I ran</p>
  <pre><code>wget https://localhost --no-check-certificate
  </code></pre>
  <p>I could get index.html which is the correct response. So it seems to me the web application is taking https requests.</p>
  <p>I have never changed default listening port, to verify, I ran this to check listening ports</p>
  <pre><code>sudo netstat -tnlp | grep :5001
  </code></pre>
  <p>The result shows dotnet is listening on port 5001 and 5000.</p>
  <p>In another attempt, I used visual studio debugger to attach to the linux dotnet process, and set a few breakpoints. I could see that when using a browser the breakpoint was not reached. But when using wget like above the breakpoint was reached.</p>
  <p>Any advice is appreciated. Thank you.</p>