Some time ago, I went back to using Valet for local development, and I’ve been happy with it since. Up until sometime last week, I’d yet to run into any problems.
But when working on a WordPress plugin that imports data using admin-ajax, I kept getting a curious message in the console no matter how large or small the data was. Specifically, I was getting an error about “502 (Bad Gateway).”
The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
And if you try to diagnose it based on that definition, you won’t get very far. It’s not that it’s wrong, but it’s that you need to modify your server configuration.
Luckily, it’s easy. Or it’s likely easy.