title: Nginx Wordpress issue with REST Api 401
body: <p>I have migrated from shared LAMP hosting to VPS NGINX and faced an issue with wordpress REST Api, when I try to get /wp-json/wp/v2/posts/ it response with error:</p>
  <pre><code>{
    &quot;code&quot;: &quot;rest_forbidden&quot;,
    &quot;message&quot;: &quot;You are not currently logged in.&quot;,
    &quot;data&quot;: {
      &quot;status&quot;: 401
    }
  }
  </code></pre>
  <p>But when I request woocommerce REST Api it works fine.
  On Apache server all works fine.
  Permalinks are enabled.
  Have tried to add rewrite rules</p>
  <pre><code>rewrite ^/wp-json/(.*?)$ /index.php?rest_route=/$1 last;
  </code></pre>
  <p>But it has no effect</p>