title: run ASP.NET Core app under Linux on startup
body: <p>I would like to run my ASP.NET Core solution under linux with the result it runs on startup.</p>
  
  <p>From Microsoft <a href="https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx" rel="noreferrer">docs</a>, there are 2 ways: <strong>Apache</strong> and <strong>Nginx</strong>.</p>
  
  <p>Both approaches involve <strong>proxy pass</strong>, e.g.</p>
  
  <p>Apache:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ProxyPreserveHost On
      ProxyPass / http://127.0.0.1:5000/
      ProxyPassReverse / http://127.0.0.1:5000/
      ....
  </code></pre>
  
  <p>Nginx:</p>
  
  <pre><code>server {
      listen        80;
      server_name   example.com *.example.com;
      location / {
          proxy_pass         http://localhost:5000;
          ...
  </code></pre>
  
  <p>Since Apache or Nginx only acts as proxy - do I get it right that <strong>I have to manually start the dotnet app</strong>?</p>
  
  <p>I can't see the bit in the documentation where something could trigger <code>dotnet run</code> command against my WebApi project.</p>
  
  <p>Obviously, Apache or Nginx wouldn't handle triggering dotnet app - unless I've missed something.</p>
  
  <p><strong>Is there a way to automatically start the app on OS startup</strong>?</p>