title: How to serve subdirectory as root in nginx using django?
body: <p>When a user visits www.website.com I would like to server content as if the user went to www.website.com/frontend/. However, I want to mask the /frontend/ part of the url so the user doesn't see it. Can this be done?</p>
  
  <p>What would my rewrite rule look like?</p>
  
  <p>SOLVED:</p>
  
  <pre><code>location = / {
      rewrite ^/$ /frontend/ last;
  }
  </code></pre>
  
  <p>My issue was </p>
  
  <pre><code>location = / {} #Matches the path project.example.com only (mind there is a =)
  location / {} #Matches every path (mind: there is no =)
  </code></pre>