0

I am using node.js server and implemented socket.io.

It works fine, but for some reason, I have to use Apache Tomcat, running on port 8080, and the node server running on 8081.

If I run the application via :8081 (serving pages through node.js), socket.io (socket.io is listening to 8081 port) is working, but when I serve through Apache Tomcat running application via :8080/Demo_Pro/index.html, socket.io is not working.

Can anybody explain how to run both Apache Tomcat and node.js at the same time.

Pascal Belloncle
  • 11,184
  • 3
  • 56
  • 56
Ravi Chandra
  • 3
  • 1
  • 3

1 Answers1

0

You should look on google on how to host node.js and apache at the same time. You'll find that you'll have to use mod_proxy to proxy requests through apache. (node.js needs to be on another port). Look at this link: how to put nodejs and apache in the same port 80. It'll give you an idea on how to do it.

Community
  • 1
  • 1
C.O.D.E
  • 885
  • 8
  • 19
  • i fond a solution, deploy the application in apache and let the port be in 8080, and run the nodejs server at another port (say :8081) then we have to configure the socket.io at client side to 8081 port (say application is running in local host then io.losten("http://localhost:8081/")). – Ravi Chandra Mar 09 '13 at 10:25