Skip to content

Switch the prefered local web server to the Symfony one #11377

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
6 changes: 0 additions & 6 deletions frontend/encore/dev-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ by the normal `webpack-dev-server`_. For example:

This will start a server at ``https://localhost:9000``.

.. note::

This Webpack server is independent from
:doc:`Symfony's development web server </setup/built_in_web_server>` and
you need to run both separately.

Using dev-server inside a VM
----------------------------

Expand Down
12 changes: 7 additions & 5 deletions setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Installing & Setting up the Symfony Framework

To create your new Symfony application, first make sure you're using PHP 7.1 or higher
and have `Composer`_ installed. If you don't, start by :doc:`installing Composer globally </setup/composer>`
on your system. If you want to use a virtual machine (VM), check out :doc:`Homestead </setup/homestead>`.
on your system.

Create your new project by running:

Expand All @@ -33,17 +33,19 @@ In other words, your new app is ready!
.. code-block:: terminal

$ composer create-project symfony/skeleton my-project

# optional: install the web server bundle (explained next)
$ cd my-project
$ composer require --dev symfony/web-server-bundle

Running your Symfony Application
--------------------------------

On production, you should use a web server like Nginx or Apache
(see :doc:`configuring a web server to run Symfony </setup/web_server_configuration>`).
But for development, it's convenient to use the :doc:`Symfony PHP web server <setup/built_in_web_server>`.
But for development, it's convenient to use the :doc:`Symfony Local Web Server <setup/symfony_server>`.

.. note::

If you want to use a virtual machine (VM) with Vagrant, check out
:doc:`Homestead </setup/homestead>`.

Move into your new project and start the server:

Expand Down
14 changes: 9 additions & 5 deletions setup/built_in_web_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
How to Use PHP's built-in Web Server
====================================

Since PHP 5.4 the CLI SAPI comes with a `built-in web server`_. It can be used
to run your PHP applications locally during development, for testing or for
application demonstrations. This way, you don't have to bother configuring
a full-featured web server such as
:doc:`Apache or Nginx </setup/web_server_configuration>`.
The PHP CLI SAPI comes with a `built-in web server`_. It can be used to run your
PHP applications locally during development, for testing or for application
demonstrations. This way, you don't have to bother configuring a full-featured
web server such as :doc:`Apache or Nginx </setup/web_server_configuration>`.

.. tip::

The preferred way to develop your Symfony application is to use
:doc:`Symfony Local Web Server </setup/symfony_server>`.

.. caution::

Expand Down
9 changes: 5 additions & 4 deletions setup/web_server_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Configuring a Web Server
========================

The preferred way to develop your Symfony application is to use
:doc:`PHP's internal web server </setup/built_in_web_server>`. However,
when using an older PHP version or when running the application in the production
environment, you'll need to use a fully-featured web server. This article
describes several ways to use Symfony with Apache or Nginx.
:doc:`Symfony Local Web Server </setup/symfony_server>`.

However, when running the application in the production environment, you'll need
to use a fully-featured web server. This article describes several ways to use
Symfony with Apache or Nginx.

When using Apache, you can configure PHP as an
:ref:`Apache module <web-server-apache-mod-php>` or with FastCGI using
Expand Down