hi,
i this problem. I want use nginx as proxy for my developement site.
in my site when the user buy one product i made a paypal call.
i want this behaviour: if in the broswer i digit http://www.mysite.it nginx redirect in my local site http://dev-mysite.it
if in the broswer i digit https://www.paypal.com redirect to the real site. no proxy must be effectuated.
i write this config file
but don't work. for my site this work fine. but when i digit https://www.paypal.com an error occurs. no page it's loaded, and in the log i see this.
127.0.0.1 - - [31/Aug/2011:16:25:39 +0200] "CONNECT www.paypal.com:443 HTTP/1.1" 400 173 "-" "-"
someone can help me?
thank you everybody.
my config file.
server {
listen 4444;
server_name www.mysite.it mysite.it;
location / {
proxy_pass http://dev.mysite.it;
proxy_set_header Host $host ;
}
}
server {
listen 4444;
server_name www.paypal.com paypal.com;
ssl on;
ssl_certificate /home/pier/prove_certificati/my-server.pem;
ssl_certificate_key /home/pier/prove_certificati/my-server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
add_header Front-End-Https on;
location / {
proxy_pass https://www.paypal.com:443;
proxy_set_header Host $host ;
proxy_set_header X-Real-IP $remote_addr ;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
proxy_set_header X-Forwarded-Proto https;
}
}