Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 0 down vote accepted

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?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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