赞
踩
2.配置nginx代理:
server {
listen 443 ssl;
server_name test.bwot.com;
ssl_certificate /etc/emqx/certs/7350644_test.bwot.com.pem;
ssl_certificate_key /etc/emqx/certs/7350644_test.bwot.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# 添加代理
location /mqtt {
proxy_pass http://127.0.0.1:8083/mqtt;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# client_max_body_size 35m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。