Resolve https://, redirect to https, forward to new IP

I am trying to use nginx with EE as a proxy server to resolve a https:// error on a remote server and am having a difficult time finding my way through so I was hoping you might be able to help out. Essentially I need to direct traffic through my server ( , process the SSL certificate, 301 redirect https:// to http:// then send traffic to remote server (yyy.yyy.yyy.yyy) . Any help is much appreciated! Thanks!!

I’m not sure to understand. What do you mean by 301 redirect from https:// to http:// ?