Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following nginx codes won't forward resources of 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

server {
    listen 80;

    location /https-site {

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
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


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.