8080?1883?
是的
我们现在用的就是 nginx
另外,可以参考一下:
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