Move a blog on a different server from a subdomain to a folder using Nginx

I have a node js application that runs on a VPS, and recently we added a blog to the site, we choose WordPress for the blog CMS, for avoiding configuring VPS for PHP and WP we moved blog to another host with cpanel and different ip on a subdomain. Now we decide for some reason (SEO and etc) to move from subdomain to subfolder of the main domain.