使用socket io是否意味着放弃PHP和apache? [关闭]

So I've started working a little with Node JS and socket io for building fast and stable real time web applications (I'm pretty newbie to those). The thing is that up until now I've been using LAMP and I don't think I am ready to abandon apache and php for developing a website completely with node js.

Can anyone please tell me what is the standard structure of integrating socket io with apache?

For any Socket.IO web app you still need:

  1. an HTTP server
  2. a Socket.IO server

Node.js can do both those, but can't serve PHP content.

Apache can only do the HTTP / PHP parts.

It's perfectly possible to mix and match, but it's down to you do decide whether it's appropriate.

You can use multiple technologies on the same Server using different ports, with no further configuration needed.

If you however want to have PHP and node.js apps on the same port, maybe 80, you need a proxy.

Using node.s on port 80 with the node-http-proxy module also works like a charm with websockets.

I was searching for a solutions for such a setup recently an ended up with what i wrote down here: http://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/