title: php -S localhost:port: Says waiting for localhost forever
body: <p>I have <code>LAMP</code> installed.</p>
  
  <p>I have <code>phptest.php</code> which contains <code>&lt;?php phpinfo(); ?&gt;</code></p>
  
  <p>I tried:</p>
  
  <pre><code>[.public_html]$ php -S localhost:54545 phptest.php 
  [Mon Jan 25 21:06:52 2016] PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0
  PHP 5.6.14 Development Server started at Mon Jan 25 21:06:52 2016
  Listening on http://localhost:54545
  Document root is /home/simha/.public_html
  Press Ctrl-C to quit.
  </code></pre>
  
  <p>Then I open <code>http://localhost:54545</code> in Chrome and it says <code>waiting for localhost</code>.</p>
  
  <p>I tried <code>http://localhost:81</code> (why 81 see below) and <code>http://localhost:81/~simha</code> all of them works. It shows the respective root directories. There looks no problem with my Apache.</p>
  
  <p>Also some background about the <code>host</code> and <code>container</code>:</p>
  
  <p>I have Linux OS with LAMP installed. Using <code>systemd-nspawn</code> I run the same Linux OS with LAMP in a container.</p>
  
  <p>I have set 80 port for the hosts LAMP and 81 port for the containers LAMP</p>
  
  <p>In the host system there is no such problem. The same file will open in chromium after <code>php -S localhost:xxxxx phptest.php</code></p>
  
  <p>But in the container, it just says <code>waiting for localhost</code>.</p>