thingsboard 部署到公网,需要开放哪些端口? · 物联网平台-威尼斯人最新

tom · 2020年03月10日 · 最后由 sds 回复于 2020年10月25日 · 732 次阅读

8080?1883?

对 回复

这两个端口已经开放了,可以登录,但是遥测数据刷新不出来。f12 检查发现有错误如下:

对 回复

我之前遇到过,但是后来我从 apache 换成了 ngnix 就好了。

我们现在用的就是 nginx

对 回复

80 端口也在安全组开放一下

对 回复

另外,可以参考一下:


ok i solved my problem. i'm writing this for others who have the same problem.
the solution is to add this:
        rewriteengine on
        rewritecond %{http:upgrade} =websocket [nc]
        rewriterule /(.*) ws://192.168.0.28:8080/$1 [p,l]
there are a lot of posts online saying to just add only proxypass entry or the rewriterule, but no one says to combine them.
just to be completely clear, you need this block to proxy a websocket with apache2:
        proxypass /api/ws wss://192.168.0.28:8080/
        proxypassreverse /api/ws wss://192.168.0.28:8080/
        rewriteengine on
        rewritecond %{http:upgrade} =websocket [nc]
        rewriterule /(.*) ws://192.168.0.28:8080/$1 [p,l]

以上这段话摘取最上面的 url,大概意思是说他遇到的问题跟你一样,只需要配置一下规则就行,不过他的是 apache 的,你需要转换成 nginx

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
网站地图