nginx正向代理配置
一、前言 正向代理功能比较简单,但是原生nginx不支持https代理,如果访问https网站,会报错。 # nginx代理不支持http CONNECT方法: curl: (56) Received HTTP code 400 from proxy after CONNECT 为了实现对https代理的支持,需要对原有nginx源码打补丁,就可以让nginx支持CONNECT模式了。 https://github.com/chobits/ngx_http_proxy_connect_module#build-openresty 二、下载并安装openresty shell> yum -y install lua-devel shell> wget http://dlsw.91donkey.com/software/source/nginx/openresty-1.15.8.1.tar.gz shell> wget http://dlsw.91donkey.com/software/source/nginx/nginx-http-concat_20161124.tgz && tar zxf nginx-http-concat_20161124.tgz shell> wget http://dlsw.91donkey.com/software/source/nginx/ngx