I'm using Socket.io ver 1.0.6. I have problem with using socket.io and apache proxy.
Proxy have defined in vhots and look like this:
ServerAdmin webmaster@localhost
ServerName site.loc
DocumentRoot /home/site/Private/dev/site
ProxyPass /node http://localhost:5000
ProxyPassReverse /node http://localhost:5000
so url http://site.loc/node should run http://site.loc:5000
node server look like this:
var port = 5000;
var server = require('http').Server();
var io = require('socket.io')(server);
io.on('connection', function(socket){
});
server.listen(port);
console.log('Listening on port: ' + port);
and client:
var socket = io.connect('ws://site.loc', {path: '/node/socket.io'});
And I receive message with
Error during WebSocket handshake: Unexpected response code: 400
I don't want to use in node server namespace, but only route all data from url with /node to port 5000.
Thanks for help