server {
resolver 8.8.8.8;
resolver_timeout 5s;
listen 0.0.0.0:8080;
access_log /home/reistlin/logs/proxy.access.log;
error_log /home/reistlin/logs/proxy.error.log;
location / {
proxy_pass $scheme://$host$request_uri;
proxy_set_header Host $http_host;
proxy_buffers 256 4k;
proxy_max_temp_file_size 0;
proxy_connect_timeout 30;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 301 1h;
proxy_cache_valid any 1m;
}
}不支持代理 Https 网站
因为 Nginx 不支持 CONNECT,所以无法正向代理 Https 网站(网上银行,Gmail)。
如果访问 Https 网站,比如:https://www.google.com,Nginx access.log 日志如下:"CONNECT www.google.com:443 HTTP/1.1" 400请问各位大大 nginx 正向代理 如何支持HTTPS的 请求?
--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html