-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 2.4: Added comma after "For example" Improved clarity of explanation around overriding setTargetPath() Removed redundant POST request exclusion info Revert "missing backtik" typo, replaced form by from replaced forgo by forgot removed unnecessary parentheses missing backtik cleaned up the code example fixed wrongly linked dependency fixed directive syntax add cookbook article for the server:run command document the usage of PHP-FPM on Apache Avoiding builds for the git notes [#3940] Adding php example for an array of emails Conflicts: cookbook/console/sending_emails.rst
- Loading branch information
Showing
14 changed files
with
213 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.. index:: | ||
single: Web Server; Built-in Web Server | ||
|
||
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 </cookbook/configuration/web_server_configuration>`. | ||
|
||
.. caution:: | ||
|
||
The built-in web server is meant to be run in a controlled environment. | ||
It is not designed to be used on public networks. | ||
|
||
Starting the Web Server | ||
----------------------- | ||
|
||
Running a Symfony application using PHP's built-in web server is as easy as | ||
executing the ``server:run`` command: | ||
|
||
.. code-block:: bash | ||
$ php app/console server:run | ||
This starts a server at ``localhost:8000`` that executes your Symfony application. | ||
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: | ||
|
||
.. code-block:: bash | ||
$ php app/console server:run 192.168.0.1:8080 | ||
Command Options | ||
--------------- | ||
|
||
The built-in web server expects a "router" script (read about the "router" | ||
script on `php.net`_) as an argument. Symfony already passes such a router | ||
script when the command is executed in the ``prod`` or in the ``dev`` environment. | ||
Use the ``--router`` option in any other environment or to use another router | ||
script: | ||
|
||
.. code-block:: bash | ||
$ php app/console server:run --env=test --router=app/config/router_test.php | ||
If your application's document root differs from the standard directory layout, | ||
you have to pass the correct location using the ``--docroot`` option: | ||
|
||
.. code-block:: bash | ||
$ php app/console server:run --docroot=public_html | ||
.. _`built-in web server`: http://www.php.net/manual/en/features.commandline.webserver.php | ||
.. _`php.net`: http://php.net/manual/en/features.commandline.webserver.php#example-401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Web Server | ||
========== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
built_in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters