As I remember, it was not a problem with the nginx server, it was something with the settings in moodle.
Moodle office tool integrations
OAuth Nginx
Este tema ye estau blocau asinas que no podrás responder en ell.