Reputation: 1789
I install CakePHP. Let say that I want to run CakePHP on port 8080, instead of port 8765. How can I do that?
I tried to use bin/cake server 8080
, but with no success. EDIT - It's just running still on 8765, without saying errors.
Thanks for any help.
Upvotes: 2
Views: 4314
Reputation: 66208
All commands come with help:
-> bin/cake server --help
Welcome to CakePHP v3.x.x Console
---------------------------------------------------------------
App : src
Path: /var/www/example.dev/src/
DocumentRoot: /var/www/example.dev/webroot/
---------------------------------------------------------------
PHP Built-in Server for CakePHP
[WARN] Don't use this at the production environment
Usage:
cake server [-h] [-v] [-q] [-H] [-p] [-d]
Options:
--help, -h Display this help.
--verbose, -v Enable verbose output.
--quiet, -q Enable quiet output.
--host, -H ServerHost
--port, -p ListenPort
--document_root, -d DocumentRoot
The port is an option. I.e. the command you are looking for is:
-> bin/cake server --port=8080
Welcome to CakePHP v3.x.x Console
---------------------------------------------------------------
App : src
Path: /var/www/example.dev/src/
DocumentRoot: /var/www/example.dev/webroot
---------------------------------------------------------------
built-in server is running in http://localhost:8080/
You can exit with `CTRL-C`
Upvotes: 5