Coder Social home page Coder Social logo

Comments (7)

rmccue avatar rmccue commented on June 15, 2024

Do you have pretty permalinks enabled? Did you install this as a plugin, or did you use the (not recommended) "As Part of Core" installation?

from wp-api.

heirenton avatar heirenton commented on June 15, 2024

I am experiencing same thing. wp-json responds, but /posts does not work. Ubuntu VPS & NGINX with pretty permalinks enabled.

from wp-api.

rednaxus avatar rednaxus commented on June 15, 2024

plugin, and yes i have pretty permalinks

from wp-api.

afurculita avatar afurculita commented on June 15, 2024

@rednaxus maybe try to flush your rewrite rules?

from wp-api.

rmccue avatar rmccue commented on June 15, 2024

I thought this was caused by nginx's pathinfo rules, but that appears to break /wp-json.php as well for me. I'm not sure exactly what could be causing this.

from wp-api.

wkw avatar wkw commented on June 15, 2024

We've run into some issues in situations where nginx is proxy for apache, both on our internal dev servers, and at WPEngine.com. It may be related to the quantity of "Link:" headers which are sent. Here's a representative message from the nginx error log:

[error] 9250#0: *88815 upstream sent too big header while reading response header from upstream, client: xx.xx.xx.xx, server: redacted.com, request: "GET /wp-json.php/posts?filter%5Bposts_per_page%5D=-1&type=case_study HTTP/1.1", upstream: "http://10.32.2.20:80/wp-json.php/posts?filter%5Bposts_per_page%5D=-1&type=case_study", host: "-redacted-", referrer: "http://redacted.com/what-we-do/interactive-map/"

We got around this on internal environment with some nginx mods:
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;

But have since removed those when we ran into the issue at wpengine, and couldn't tweak nginx. Instead, we've commented out the line of source code which sends the "Link:" headers (for expediency on the project).

from wp-api.

rmccue avatar rmccue commented on June 15, 2024

We changed the API URLs to /wp-json/ which should fix the main issue here.

@wkw That's incredibly strange; I'll look into it. If you can still replicate, please open a new issue. :)

from wp-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.