nginx代理双向https

配置nginx

yum -y install gcc gcc-c++ autoconf automake make

yum -y install pcre-devel

yum -y install openssl openssl-devel

./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-threads --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module

make

make install

nginx.conf配置  示例配置代理443端口

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid logs/nginx.pid;


events {
    worker_connections  1024;
}


stream {
    resolver 114.114.114.114;
    server {
        listen 443;
        ssl_preread on;
        proxy_connect_timeout 5s;
        proxy_pass backend ;
    }

upstream backend {
server ip:443;

}
}
 


版权声明:本文为qq_35329912原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。