title: Docker nginx proxy to host
body: <p><strong>Short description:</strong> </p>
  
  <p>Nginx running on docker, how to configure nginx so that it forwards calls to host.</p>
  
  <p><strong>Long description:</strong></p>
  
  <p>We have one web application which communicates to couple of backends (lets says rest1, rest2 and rest3). We are responsible for <code>rest1</code>.</p>
  
  <p>Lets consider that I started <code>rest1</code> manually on my pc and running on 2345 port. I want nginx (which is running in docker) to redirect all call to<code>rest1</code> to my own running instance(note, the instance is running on host, not any container and not in docker). And for <code>rest2</code> and <code>rest3</code> to some other docker node or may be some other server (who cares).</p>
  
  <p><strong>What I am looking for is:</strong></p>
  
  <ol>
  <li><code>docker-compose.yml</code> configurations (if needed).</li>
  <li>nginx configuration.</li>
  </ol>
  
  <p>Thanks in advance.</p>