I'm using amazon cloud. I have configured LB with SSL certificates and LB's port 443 is pointing to 80 to the instance. Nginx is running on instance on port 80. I have configured nginx like if some request, say abc.com, comes on port 80 of instance it will proxypass the request to another instance say xyz.com on HTTP.

But my concerns is, when I hit https://abc.com, it's proxypassing tohttp://xyz.com. I want that, http://xyz.com should show https://xyz.com.

How to set up a proxy in nginx where the client connects over HTTPS, but the proxy connects to the final destination server using HTTP?

  • Are you trying to proxy pass HTTPS to HTTP, but still make it show to the client's browser as HTTPS? – slm Nov 9 '13 at 5:03

If you want to do http to the backend, even when the client connects with https to the front-end, then in your proxy_pass, just avoid using $scheme://, and use http:// instead. This should solve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.