title: Persistent connection of websocket into live server
body: <p>I have implement rachet websocket with codeigniter and it's working fine in localhost. This is a main server.php that we need to run from terminal / cmd</p>
  
  <pre><code>require __DIR__ . "/../vendor/autoload.php";
  
  use Chat\Chat;
  
  use Ratchet\Server\IoServer;
  use Ratchet\Http\HttpServer;
  use Ratchet\WebSocket\WsServer;
  
  $server = IoServer::factory(new HttpServer(new WsServer(new Chat)), 2000);
  
  $server-&gt;run();
  </code></pre>
  
  <p>I run this file from cmd with following command</p>
  
  <pre><code>D:\wamp\www\my_project\api\application\third_party\Realtime\bin server.php
  </code></pre>
  
  <p>This command start socket and now any user access my site through browser then they are connect with socket and I can sent message to him. When I close terminal / cmd then socket close automatic.</p>
  
  <p>Now my development is done and I upload all source on "openSuse" server. So my question is how I run above server.php file on live server ? (for example amazon ec2 OpenSuse server). because server don't have terminal / cmd.</p>
  
  <p>Also this should run persistent so any time any user access my site they are connect to server and I will send him message.</p>
  
  <p>I try many way but it's not working any how.</p>