6

I have a hostgator VPS hosting account.

I already have a site at my main domain, say mydomain.com

now i want to install node.js server for chat.mydomain.com.

i need some help installing the node.js server.

what i m looking for is, How to setup the node.js server? - I can download and install the node v 0.4.6 but how to make it listen to a port say chat.mydomain.com:8088 like apache? That is install the "node" as a service and listen to port 8088 like apache listens to port 80?

Thanks,
Anjan

anjan
  • 3,147
  • 6
  • 26
  • 31

1 Answers1

8

All you need to is to open up a port to listen to requests e.g. if you want to run Node on 8088 and then access it with chat.mydomain.com.

According to their support, you need to contact them to open up 8088 for you > http://support.hostgator.com/articles/pre-sales-policies/open-new-ports

neebz
  • 11,465
  • 7
  • 47
  • 64
  • Useful info nEEbz! Thanks :) i will contact the hostgator support to open up the 8088 port that i want. Still, i will need all the info to make the node.js server running. As, since i would have to go as "root" on my live server, i don't want to mess around :D – anjan Apr 21 '11 at 10:19
  • come back once the port is open. you'll need to get root and run the node anyways. that's how it works – neebz Apr 21 '11 at 10:54
  • Hostgator says they will open ports for outbound connection only. so, if the port can't receive inbound connection, can i really make use of Node.js server? as per my understanding if inbound requests are off, then i can't send a request to node.js server and thus get no response. – anjan Apr 24 '11 at 09:04
  • I just read your question again and it said you had an VPS account. The support link (in the answer) they clearly say that they can open both inbound and outbound ports for VPS account Email them at support@hostgator.com and send them the above link. It's pretty pathetic if they don't. – neebz Apr 24 '11 at 09:47
  • Yep! they opened the port 8088, they didn't notice that i have the VPS at first. but when i point that out, they did it in seconds :) And also i have installed node.js on that port and running fine. But for port issue it doesn't seem to work for all computers. Some can access it and some can't. Is there any work around? i mean something like a port forwarder or any kind of proxy. I heared about nginx. but don't know if it will work here. any help appreciated.thanks :) – anjan Apr 27 '11 at 15:00
  • yea nginx can work but unfortunately I am not too sure how to set it up. usually you setup an application using some kind of control panel and set it to by accessed at 8088. Then you point a domain to that application. I am not too sure how to do it with nginx though – neebz Apr 27 '11 at 15:46