前端連接socket.io server遇到port問題的解決方法。
haproxy
configure-haproxy-to-scale-multiple-nodes-with-stickiness-and-ssl
using-haproxy-with-socket-io-and-ssl
這個方法有在Centos上面實作過是可行的,網路也有不少設定可以參考,不過當初只有測試websocket的方法。
nginx
nginx-websockets-ssl-and-socket-io-deployment
nginx在1.3之後支援websocket可以最為反向代理,這個方法沒有實測過。
透過改寫xhr-polling
how-to-make-socket-io-work-behind-nginx-mostly
這個方法是改寫xhr-polling的方法,前端就可以不用加上port就可以直接連接server,但是就不能使用其他的
連接方法了吧?