hirengm
By:
hirengm

Need to configure socket.io over ssl using nginx

April 25, 2017 542 views
PHP Node.js Ubuntu

Hi,
We have hosted www.breety.com on your server and it is working fine.
But right now we are trying to use nodejs (socket.io) over ssl on nginx server on port 7024.

We have tested on local environment using nginx server and socket,and its working fine.But on live environment we are facing errors as given below:

  1. GET https://www.breety.com:7024/socket.io/?EIO=3&transport=polling&t=LkVPrSN net::ERRTIMEDOUT

  2. GET https://www.breety.com:7024/socket.io/?EIO=3&transport=polling&t=LkVPrSN net::ERRCONNECTIONREFUSED

please guide us how to configure socket.io over ssl using nginx.?

2 Answers

Hi @hirengm

This is the community forum (meaning user-to-user support).

Can you post your Nginx configuration of the server blocks? The problem most like is here - or that development environment most likely didn't have https.

Hi there - If you are trying to keep open a persistent connection have you tried using a product like [https://www.pubnub.com/docs/nodejs-javascript/pubnub-javascript-sdk ](http://) which uses standard SSL port 443 and doesn't require you to open any additional ports. (full discloser I work for PubNub). Or take a look at this open source package that lets you switch between realtime providers [http://rltmjs.com](http://)/

Have another answer? Share your knowledge.