Fixed it!

So, pages and posts now work and do not give a 404 error. I’d broken something in the nginx configuration, but it’s all better now!