Nginx 配置 HTTPS SSL 代理

配置文件如下:

#user  nobody;
worker_processes  1;
  
events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
 
    sendfile        on; 
    keepalive_timeout  65;
 
    upstream tomcats{ 
     server www.ironfo.com:443; 
    }
 
    server {
        listen       80;
        server_name  localhost;
 
        location / { 
            proxy_pass https://tomcats;
            index  index.html index.htm;
        }
  
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        } 
    } 
}

 

[root@localhost sbin]# ./nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module
[root@localhost sbin]# 

 

posted @ 2019-09-16 22:57  VipSoft  阅读(1821)  评论(0编辑  收藏  举报