V
V
Vladislav Nagorny2016-04-22 01:53:11
Node.js
Vladislav Nagorny, 2016-04-22 01:53:11

How to make ssl socket.io work?

Good evening.
I put the site on the SSL server, but I have a chat on sockets, what should I do so that, for example , https://test.ru:3002 - works over SSL?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Nagorny, 2016-04-22
@esvils

RewriteEngine on
RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
RewriteCond %{QUERY_STRING} transport=websocket    [NC]
RewriteRule /(.*)           ws://localhost:3002/$1 [P,L]

ProxyPass /socket.io/ws/ ws://localhost:3002/socket.io/
ProxyPassReverse /socket.io/ws/ ws://localhost:3002/socket.io/

ProxyPass /socket.io/ http://localhost:3002/socket.io/
ProxyPassReverse /socket.io/ http://localhost:3002/socket.io/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question