The following nginx codes won't forward resources of https://ooo.xxx/ to plain http content, because nginx doesn't support CONNECT when proxying(correct me if wrong). What I want is that, when user visit http://mysite/https-site/somepage, he/she will actually see the content of https://ooo.xxx/somepage.

server {
    listen 80;

    location /https-site {
        proxy_pass https://ooo.xxx;

I know if makes nginx listen on port 443 with a self-signed SSL certificate, it will work. But I don't want users to visit https://mysite/ instead, and that also requires to ignore the SSL certificate warning from the browser.

Any approaches are welcome(even irrelevant to nginx). Thanks.

  • You want to make secure content insecure? – Matt Nov 22 '12 at 0:47
  • For some reasons, users can not reach the target https site. So I want to proxy it to users. – vvoody Nov 22 '12 at 1:50

Are you insistent on using nginx, or could you use apache instead?

Here's a reference to someone else doing something similar to what you want with apache and here's another and here's another.

Maybe I misunderstand....are you trying to do this:

client pc ---- http ---- ngnix ---- https ---- target https host

Essentially having the ngix box be a man in the middle and decrypting the https traffic to allow the client to access the site over http?

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.