From 28645d9e929af186e12aa2bdc597a45c3bb8e4a2 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 19 Oct 2014 20:29:39 +0200 Subject: [PATCH] add sidebar for the built-in server in VMs --- cookbook/web_server/built_in.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/cookbook/web_server/built_in.rst b/cookbook/web_server/built_in.rst index f7ef8d1f039..d584ab806e3 100644 --- a/cookbook/web_server/built_in.rst +++ b/cookbook/web_server/built_in.rst @@ -30,12 +30,29 @@ The command will wait and will respond to incoming HTTP requests until you terminate it (this is usually done by pressing Ctrl and C). By default, the web server listens on port 8000 on the loopback device. You -can change the socket passing an ip address and a port as a command-line argument: +can change the socket passing an IP address and a port as a command-line argument: .. code-block:: bash $ php app/console server:run 192.168.0.1:8080 +.. sidebar:: Using the built-in Web Server from inside a Virtual Machine + + If you want to use the built-in web server from inside a virtual machine + and then load the site from a browser on your host machine, you'll need + to listen on the ``0.0.0.0:8000`` address (i.e. on all IP addresses that + are assigned to the virtual machine): + + .. code-block:: bash + + $ php app/console server:run 0.0.0.0:8000 + + .. caution:: + + You should **NEVER** listen to all interfaces on a computer that is + directly accessible from the Internet. The built-in web server is + not designed to be used on public networks. + Command Options ---------------