Nginx 转发至mqtt websockets wss 带域名配置

未结帖
0 749
ajian admin_jim 2018-01-12
悬赏:5飞吻
server {
	listen       443;
	server_name  wq.jimmycarbin.com;
	ssl                  on;
	ssl_certificate      /alidata/server/nginx-1.4.4/conf/https/certificate/wq.jimmycarbin.com/214293509120168.pem;
	ssl_certificate_key   /alidata/server/nginx-1.4.4/conf/https/certificate/wq.jimmycarbin.com/214293509120168.key;
	ssl_session_timeout  5m;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配
	ssl_ciphers  ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配
	underscores_in_headers on;

	location / {
		proxy_pass  http://39.106.111.41:8885;
		proxy_redirect off;
		proxy_set_header Host 39.106.111.41:8080;

		proxy_set_header Sec-WebSocket-Protocol mqtt;
		#more_clear_headers Sec-WebSocket-Protocol;

		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
	}
		
        ssl_prefer_server_ciphers   on;
	access_log  /alidata/log/nginx/access/wq.log;

}


热忱回答0


最近热帖

近期热议

  1. javascript——prototype与__proto 9
  2. Mysql 中出现的Data truncated for column 3
  3. 在nginx中使用x-sendfile的解决方案 3
  4. 高版本jQuery面插件实现Ajax上传图片 1
  5. Thinkphp Socket.class.php 类的使用 1
  6. 使用ionic3创建第一个App 0
  7. ios-oc html5 0
  8. nginx.conf 0
  9. 基于ionic3.4.0的项目搭建 0
  10. php 缩略图 0