Server Shell
The ServerShell
lets you stand up a simple webserver using the built in PHPwebserver. While this server is not intended for production use it canbe handy in development when you want to quickly try an idea out and don’t wantto spend time configuring Apache or Nginx. You can start the server shell with:
- $ bin/cake server
You should see the server boot up and attach to port 8765. You can visit theCLI server by visiting http://localhost:8765
in your web-browser. You can close the server by pressing CTRL-C
in yourterminal.
Note
Try bin/cake server -H 0.0.0.0
if the server is unreachable from other hosts.
Changing the Port and Document Root
You can customize the port and document root using options:
- $ bin/cake server --port 8080 --document_root path/to/app
当前内容版权归 cakephp.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 cakephp.org .