Skip to content

Commit 691b13d

Browse files
committed
feature #4340 [Cookbook][Web Server] add sidebar for the built-in server in VMs (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Cookbook][Web Server] add sidebar for the built-in server in VMs | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #4149 As discussed with @weaverryan in #4000, this pull request adds a sidebar which explains how to easily use the built-in web server in virtual machines to make it accessible from the host machine. Commits ------- 28645d9 add sidebar for the built-in server in VMs
2 parents d07d5fe + 28645d9 commit 691b13d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

cookbook/web_server/built_in.rst

+18-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,29 @@ The command will wait and will respond to incoming HTTP requests until you
3030
terminate it (this is usually done by pressing Ctrl and C).
3131

3232
By default, the web server listens on port 8000 on the loopback device. You
33-
can change the socket passing an ip address and a port as a command-line argument:
33+
can change the socket passing an IP address and a port as a command-line argument:
3434

3535
.. code-block:: bash
3636
3737
$ php app/console server:run 192.168.0.1:8080
3838
39+
.. sidebar:: Using the built-in Web Server from inside a Virtual Machine
40+
41+
If you want to use the built-in web server from inside a virtual machine
42+
and then load the site from a browser on your host machine, you'll need
43+
to listen on the ``0.0.0.0:8000`` address (i.e. on all IP addresses that
44+
are assigned to the virtual machine):
45+
46+
.. code-block:: bash
47+
48+
$ php app/console server:run 0.0.0.0:8000
49+
50+
.. caution::
51+
52+
You should **NEVER** listen to all interfaces on a computer that is
53+
directly accessible from the Internet. The built-in web server is
54+
not designed to be used on public networks.
55+
3956
Command Options
4057
---------------
4158

0 commit comments

Comments
 (0)