Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reworded the built-in web server articles for Symfony 3.3#8273

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
javiereguiluz wants to merge3 commits intosymfony:3.3fromjaviereguiluz:fix_8270
Closed
Show file tree
Hide file tree
Changes fromall 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
14 changes: 9 additions & 5 deletionssetup.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -158,16 +158,20 @@ the ``create-project`` command:
Running the Symfony Application
-------------------------------

Symfony leverages the internal PHP web server (available since PHP 5.4) to run
applications while developing them. Therefore, running a Symfony application is
a matter of browsing to the project directory and executing this command:
In production servers, Symfony applications use web servers such as Apache or
Nginx (see :doc:`configuring a web server to run Symfony </setup/web_server_configuration>`).
However, in your local development machine you can also use the web server
provided by Symfony, which in turn uses the built-in web server provided by PHP.

First, :doc:`install the Symfony Web Server </setup/built_in_web_server>` and
then, execute this command:

.. code-block:: terminal

$ cd my_project_name/
$ php bin/console server:run

Then, open your browser and access the ``http://localhost:8000/`` URL to see the
Open your browser and access the ``http://localhost:8000/`` URL to see the
Welcome Page of Symfony:

.. image:: /_images/quick_tour/welcome.png
Expand All@@ -184,7 +188,7 @@ pressing ``Ctrl+C`` from the terminal or command console.

.. tip::

PHP's internal web server is great for developing, but should **not** be
Symfony's web server is great for developing, but should **not** be
used on production. Instead, use Apache or Nginx.
See :doc:`/setup/web_server_configuration`.

Expand Down
36 changes: 36 additions & 0 deletionssetup/built_in_web_server.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,6 +15,42 @@ a full-featured web server such as
The built-in web server is meant to be run in a controlled environment.
It is not designed to be used on public networks.

Symfony provides a web server built on top of this PHP server to simplify your
local setup. This server is distributed as a bundle, so you must first install
and enable the server bundle.

Installing the Web Server Bundle
--------------------------------

First, execute this command:

.. code-block:: terminal

$ cd your-project/
$ composer require symfony/web-server-bundle

Then, enable the bundle in the kernel of the application::

// app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...

if ('dev' === $this->getEnvironment()) {
// ...
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
}
);

// ...
}

// ...
}

Starting the Web Server
-----------------------

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp