roadrunner源码地址:https://gitee.com/mirrors/RoadRunner?_from=gitee_search
windows下编译roadrunner源码获得rr.exe可执行文件
将rr.exe拷贝到laravel目录下
.rr.yaml配置文件内容:
version: '3'
server:
command: "php vendor/spiral/roadrunner-laravel/bin/rr-worker start"
http:
address: 0.0.0.0:8080
middleware: ["static", "headers", "gzip"]
pool:
#max_jobs: 64 # feel free to change this
supervisor:
exec_ttl: 60s
headers:
response:
X-Powered-By: "RoadRunner"
static:
dir: "public"
forbid: [".php"]
laravel框架安装roadrunner-laravel桥:
composer require spiral/roadrunner-laravel
安装完毕进入命令行就可以启动服务了:
linux下可以后台启动:
rr -c ./.rr.yaml serve -d