title: How to deploy multiple .net core projects in a single elastic beanstalk server?
body: <p>I have a single solution with 2 projects - <a href="https://github.com/vickyrathee/dotnet-test-app" rel="nofollow noreferrer">https://github.com/vickyrathee/dotnet-test-app</a></p>
  <ol>
  <li>My Website: <strong>dotnet-test-website</strong> (domain.com)</li>
  <li>My API: <strong>dotnet-test-api</strong> (api.domain.com)</li>
  </ol>
  <p>How can I configure my projects to be deployed on single Ubuntu/Amazon linux server?</p>
  <p>I already tried using the <code>Urls</code> option on <code>appsettings.json</code> to set port <code>5001</code> for API project and <code>5002</code> for website project as <a href="https://stackoverflow.com/questions/37365277/how-to-specify-the-port-an-asp-net-core-application-is-hosted-on/55276201">mentioned here</a></p>
  <p><a href="https://github.com/vickyrathee/dotnet-test-app/blob/master/dotnet-test-app/appsettings.json" rel="nofollow noreferrer">https://github.com/vickyrathee/dotnet-test-app/blob/master/dotnet-test-app/appsettings.json</a></p>
  <pre><code>{
    &quot;Urls&quot; :  &quot;http://localhost:5001&quot;
  }
  </code></pre>
  <p>But as per the EB logs, it seems to trying port <code>5000</code> instead what I defined in <code>appsettings.json</code></p>
  <pre><code>----------------------------------------
  /var/log/nginx/error.log
  ----------------------------------------
  2021/02/14 09:11:24 [error] 3583#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.10.146, server: , request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://127.0.0.1:5000/&quot;, host: &quot;172.31.26.188&quot;
  2021/02/14 09:11:39 [error] 3583#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.10.146, server: , request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://127.0.0.1:5000/&quot;, host: &quot;172.31.26.188&quot;
  2021/02/14 09:11:54 [error] 3583#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.10.146, server: , request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://127.0.0.1:5000/&quot;, host: &quot;172.31.26.188&quot;
  </code></pre>
  <p>Additionally, how to publish it correctly in separate folders, So that there are no conflict between them. EB allow single <code>zip</code> file upload with <code>appsettings.json</code> on root, while I have two with some other files as well in common and can't just put them on single directory to zip. Any help will be appreciated.</p>