title: How to create reverse proxy for multiple websites in nginx
body: <p>I have many different technologies serving APIs and sites on my local machine. I want to be able to see them via human-readable names, rather than ports.</p>
  <p>For example, I have:</p>
  <ul>
  <li>localhost:8000 =&gt; laravel api for user panel</li>
  <li>localhost:8001 =&gt; laravel api for admin panel</li>
  <li>localhost:3000 =&gt; react client for user panel</li>
  <li>localhost:3001 =&gt; nextjs client for site</li>
  <li>localhost:3002 =&gt; react client for admin panel</li>
  </ul>
  <p>And this list goes on.</p>
  <p>Remembering all these ports is not possible of course. Thus I thought to setup a reverse proxy for them:</p>
  <ul>
  <li>api.user.example.local</li>
  <li>api.admin.example.local</li>
  <li>example.local</li>
  <li>user.example.local</li>
  <li>admin.example.local</li>
  </ul>
  <p>I know I have to add these host headers to <code>/etc/hosts</code> file. I also read about <a href="https://www.interserver.net/tips/kb/local-domain-names-ubuntu/" rel="nofollow noreferrer">how to configure nginx as a reverse proxy</a> <strong>for one domain</strong>.</p>
  <p>I don't know how to do it for many sites. And only as a reverse proxy, not as a server.</p>