drmer / phpwoo
使用swoole加速你的php应用程序!
dev-master
2019-07-15 23:11 UTC
Requires
- ext-swoole: 4.*|2.*
This package is auto-updated.
Last update: 2024-09-16 11:01:10 UTC
README
使用swoole加速你的php应用程序!
编译Swoole
# install hiredis $ git clone https://github.com/redis/hiredis.git && cd hiredis $ make $ sudo make install $ sudo ldconfig # compile swoole $ git clone https://github.com/swoole/swoole-src.git && cd swoole-src/ $ phpize $ ./configure --enable-coroutine --enable-async-redis --enable-openssl $ make $ sudo make install # HOMEWORK: enable swoole extension # check installation $ php -i | grep swoole
安装
$ composer require jndrm/phpwoo
Laravel
# publish configuration $ php artisan vendor:publish --provider="Drmer\Phpwoo\Laravel\PhpwooServiceProvider" # start phpwoo server $ php artisan phpwoo
与Nginx协作
server {
listen 80;
server_name YOUR_DOMAIN;
root YOUR_DOCUMENT_ROOT;
location / {
if (!-e $request_filename) {
proxy_pass http://127.0.0.1:3737;
}
}
location = /index.php {
proxy_pass http://127.0.0.1:3737;
}
location = / {
proxy_pass http://127.0.0.1:3737;
}
}
待办事项
- 添加Laravel支持
- 添加Lumen支持
- 添加Symfony支持
- 添加Yii2支持
- 添加CodeIgniter支持
- 添加Zend Framework支持