/blog/wp-json/ nginx return 404

I hope you solved this problem since April 2020.

I got some kind of same trouble with the wordpress php files being accessible throw https://example.com/blog/ .
When wp had to make some json operations, with js calling urls like https://example.com/blog/wp-json/wp/v2/posts/23?_locale=user for instance, it used to throw a 404 error.

I solved this adding an extra rule in the nginx conf file :

    # Rule to solve the json-error problem
    location /blog/wp-json {
            try_files $uri $uri/ /blog/index.php?q=$uri$args;
    }

I hope this helps you.

Marc.