I dont have much experience neither in Node.js not in socket.io, thus maybe I will ask silly questions and sorry for that first of all.
I am trying to do following:
- Installed node on ubuntu where I have apache also installed.
Created virtual host in apache and set it as proxy to node. My conf file looks like:
<VirtualHost *:80> ServerAdmin giorgi@omedia.ge ServerName node.aidemo.info ServerAlias www.node.aidemo.info ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://127.0.0.1:8080 ProxyPassReverse http://127.0.0.1:8080 </Location> </VirtualHost>
Have created simple js file for server (first server example in socket.io website) and started server from cli with command: node server.js. It starts perfectly and listens to 8080
Created another virtualhost where I put clientside index.html (also from first example in socket.io). At first I had problem (and actually main problem is this), browser couldn't resolve path /socket.io/socket.io.js. Then I went to the url (http://localhost:8080/socket.io/socket.io.js) from lynx locally from terminal, downloaded that js and put locally with virtualhost near index.html. After this, browser could resolve that request, but I have error when socket.io.js itself is trying to get the url:
http://localhost:8080/socket.io/1/?t=1347623348836
Do you have any ideas how can I solve this problem? My main goal is to have web url from which I can access my node server and talk with it with socket.io - for example to create very simple chat.
I hope I was clear. Thank you everyone who will try to help.