Skip to content

[Cookbook][Web Server] add sidebar for the built-in server in VMs #4340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion cookbook/web_server/built_in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------

Expand Down