I am using nginx to to serve an instance of PHP application, and also at the same time running a Ratchet app to listen to a websocket connection. Problem is, both of these instance are using the same port (80).
How do I set up the server so that I can serve both?
Edit: Just came back to saw the question has been downvoted several times, understandably, I didn't really ask the question in a clear way. I apologize for that. I did do my due diligence though. I'll try clarify what I was asking, I may have misunderstood some aspects of the websocket protocol, in which case, please do correct me:
I know well that there can only be one process listening to a particular port, what I am actually having some problem undertand is the whole websocket thing, from what I understand, a websocket request begins with a HTTP handshake, after which there will be mechanism to 'upgrade' that session to the specific port.
From what I read around, it seems that this upgrade mechanism is handled by the webserver. So, how do I configure nginx to deal with this process?
All in all, the one thing that I am concerned about running the websocket server on port other than 80, is the possibility of the port being blocked. Is this concern unfounded? Any advice on how I should be setting this up?