最近搜索

nginx 配置https

浏览:603
管理员 2021-05-16 02:40
 server {

        listen       443 ;
        server_name  xd.java456.com;

           ssl on;    
	   root html;
	   index index.html index.htm;
        ssl_certificate      cert/4154416_xd.java456.com.pem;
        ssl_certificate_key  cert/4154416_xd.java456.com.key;
        #ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers  on;
        location / {
            proxy_pass   http://106.53.10.48:8084;
	    index index.html index.htm;
        }
}

server {
        listen       80;
        server_name  xd.java456.com;
	rewrite ^(.*)$  https://$host$1 permanent;  
}

 server {

        listen       443 ;
        server_name  m1.java456.com;

           ssl on;    
	   root html;
	   index index.html index.htm;
        ssl_certificate      cert/4286877_m1.java456.com.pem;
        ssl_certificate_key  cert/4286877_m1.java456.com.key;
        #ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers  on;
        location / {
            proxy_pass   http://127.0.0.1:8089;
	    index index.html index.htm;
	     client_max_body_size     50m; 
        }
}

server {
        listen       80;
        server_name  m1.java456.com;
	rewrite ^(.*)$  https://$host$1 permanent;  
}


image.png

image.png






联系站长

站长微信:xiaomao0055

站长QQ:14496453