rfc:builtinwebserver
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:builtinwebserver [2011/03/03 14:40] – fix odd things moriyoshi | rfc:builtinwebserver [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Request for Comments: Built-in web server ====== | ====== Request for Comments: Built-in web server ====== | ||
* Version: 1.0 | * Version: 1.0 | ||
- | * Date: 2011-03-03 | + | * Date: 2011-06-020 |
* Author: Moriyoshi Koizumi < | * Author: Moriyoshi Koizumi < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
* Other formats .. | * Other formats .. | ||
+ | |||
===== Introduction ===== | ===== Introduction ===== | ||
- | When it comes to web development, | + | When it comes to web development, |
While PHP is capable enough to write a standalone web server in, thanks to the enhanced stream APIs, writing it in PHP for each web application framework should not really make sense because it could not be made compatible enough with the standard environment due to difficulty of emulating PHP's per-request resource handling in the main event loop without Runkit. | While PHP is capable enough to write a standalone web server in, thanks to the enhanced stream APIs, writing it in PHP for each web application framework should not really make sense because it could not be made compatible enough with the standard environment due to difficulty of emulating PHP's per-request resource handling in the main event loop without Runkit. | ||
Line 31: | Line 32: | ||
==== Specifying Document Root ==== | ==== Specifying Document Root ==== | ||
- | The document root can be specified through | + | The document root can be specified through |
+ | |||
+ | php -S localhost: | ||
+ | |||
+ | ==== Directory Indexes ==== | ||
- | | + | If a request is made for a directory, the web server will return index.html or index.php if they exist in the directory. |
==== Router Script ==== | ==== Router Script ==== | ||
Line 40: | Line 45: | ||
php -S localhost: | php -S localhost: | ||
- | If the path to a file is given in place of document root, the file will be regarded as a router script and the document root will then be set to the directory where it belongs. | + | If the path to a file is given, the file will be regarded as a router script and the document root will then be set to the directory where it belongs. |
<code php> | <code php> |
rfc/builtinwebserver.1299163220.txt.gz · Last modified: 2017/09/22 13:28 (external edit)