当前位置: 首页 > nginx, OpenSource > 正文

Nginx不支持https的正向代理

Nginx虽然很好,但也不是万能的,“只做自己最擅长的或许才是聪明的选择”.

最近用Nginx尝试搭建了proxy代理内部机器上网,Nginx基于http的代理确实非常不错,性能真没得说。不过访问https时问题来了,登陆不了,日志中会有很多这样的记录:

192.168.0.120 – – [01/Nov/2013:05:29:39 +0000] “CONNECT www.google.com:443 HTTP/1.0” 400 166 “-” “-”
192.168.0.120 – – [01/Nov/2013:05:29:39 +0000] “CONNECT www.google.com:443 HTTP/1.0” 400 166 “-” “-”
192.168.0.120 – – [01/Nov/2013:05:29:39 +0000] “CONNECT www.google.com:443 HTTP/1.0” 400 166 “-” “-”
192.168.0.120 – – [01/Nov/2013:05:29:39 +0000] “CONNECT www.google.com:443 HTTP/1.0” 400 166 “-” “-”

问了google大神半天,偶然看到了作者Igor Sysoev的解答:http://forum.nginx.org/read.php?2,15124,15256#msg-15256

Q:I suspect Nginx has not been designed to be used as a forward proxy. If nginx won’t foot the bill, can anyone recommend a free solution please?
A:Yes, nginx has not been disigned as a forward proxy. You should try squid
which was a forward proxy from the very start.
Q:Is there any schedule to support the feathure, forward proxy ?
A:Not in near future: there is alreay good forward proxy Squid.

看来还得继续使用Squid,proxy中的战斗机。

本文固定链接: https://www.2hei.net/2013/11/02/nginx-not-support-https-forward-proxy/ | 2hei.net

该日志由 u2 于2013年11月02日发表在 nginx, OpenSource 分类下,
原创文章转载请注明: Nginx不支持https的正向代理 | 2hei.net
关键字: ,

报歉!评论已关闭.