Basic configuration

Run on another port

For example, to move the local server to port 9000, save this entire file as server.json next to your project’s vendor/ directory.

JSON
{
  "listen": { "port": 9000 }
}

The address stays at 127.0.0.1. If port 9000 is busy, choose a free port and use it in the curl command on the next page.

Start two workers

Replace the contents of server.json with this profile to keep the same port and start two PHP workers.

JSON
{
  "listen": { "port": 9000 },
  "workers": {
    "count": 2,
    "max_connections": 16
  }
}
workers.count
Each worker is a PHP process. Set this to 1 for a single worker or leave it at the default, "auto", to size the pool by available CPUs.
workers.max_connections
Each worker can accept up to 16 simultaneous connections in this example. The default is 32 per worker.