How do I keep a websocket server running, even after I close the SSH terminal?
问题 So, I am using Ratchet with PHP, and have currently uploaded a successful websocket example to my server. It works after I go to SSH, and then just manually run "php bin/chat-server.php". What I was wondering is that, in a commercial situation, how do I keep the chat server running? Thanks. 回答1: Make a daemon. If you are using symfony2, you can use the Process Component. // in your server start command $process = new Process('/usr/bin/php bin/chat-server.php'); $process->start(); sleep(1); if