Tried to solve this problem myself, but failed.
The idea is that i'm trying to run "MjmChat" extension of Yii (chat extension on nodejs). Actually, it works, but it works only on 8000 port. If i set any port different from 8000, socket.io does not serve its js.
For tests, i just cut out all the nodejs code, so it look like
var express = require('express');
var app = express(),
server = require('http').createServer(app),
io = require('socket.io').listen(server);
server.listen(8000);
It is located in the web root of my test-server (gs-test.ru) So when i run
root@gs-test:/var/www/fortis/data/www/gs-test.ru# node app.js
http://gs-test.ru:8000/socket.io/socket.io.js serves js well.
BUT! If i try to change 8000 to 8001, 9000, 9999, whatever (of course, with stopping current app.js and then restarting it) - it does not work! Just can not load socket.io.js.
Every port i tried was free (tested with #netstat -ntp), so my only idea is that the problem is with apache/nginx or smth in webserver configuration (I run debian squeeze on fastvps.ru VDS).
Thanks in advance!