siler/project
template gives a runnable configuration that fits well for development purposes.composer.json
file), by runningserve
script stored in the composer.json
file runs php -S 0.0.0.0:8000 -t .
{ip/domain}
block{ip/domain}
block is the interface on which you want your server to listen to.127.0.0.1
will run it on localhost
and you'll be able to access it by going to http://127.0.0.1
or http://localhost
in your browser.192.168.x.x
(your local IP) will listen to requests coming from your local IP.
You can retrieve it on *nix systems by running ifconfig
or ip addr
and looking for an IP generally starting with 192.168.
.0.0.0.0
will listen to requests coming from every network interface you have on your computer, that'd be localhost
(the loopback), your local IP and more !hostname
.
It'll return for example jake-computer
.php -S jake-computer[:{port}] -t .
[:{port}]
block[:{port}]
block is the port you want to bind your process to.Important: On most *nix systems, you can't set a port below 1025 without running it as root. The usual ports used are8080
and8000
.
:{port}
block is optional, but recommended.AllowOverride
contains Options=Multiviews
, like:.htaccess
file containing:index.php
entry point in your project.