title: 2 reacts project deployed on same domain nginx issue with react router
body: <p>I have 2 different react projects that I want to serve on a single domain. </p>
  
  <p>One is called 'client' which is for front office, one is admin which is for back office. The base URL is / for front office, and /admin for back office.</p>
  
  <p>My nginx.conf looks like </p>
  
  <pre><code>`location /admin/ {
          alias /{{path_to_project}}/admin/build/;
          try_files $uri $uri/ /index.html;
      }
      location / {
          alias /{{path_to_project}}/client/build/;
          try_files $uri $uri/ /index.html;
      }`
  </code></pre>
  
  <p>It's working well for client. However for admin, it works if I type domain.com/admin in the URL, then let say I change the URL to domain.com/admin/something and refresh the page, Nginx load the client bundle even though it should load admin bundle as the request starts with /admin. Thanks for your help</p>