码迷,mamicode.com
首页 > Web开发 > 详细

Nginx 配置 HTTPS SSL 代理

时间:2019-09-16 23:45:40      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:nss   event   events   file   keepalive   erro   pen   def   ror   

配置文件如下:

#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]# 

 

Nginx 配置 HTTPS SSL 代理

标签:nss   event   events   file   keepalive   erro   pen   def   ror   

原文地址:https://www.cnblogs.com/vipsoft/p/11530838.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!