项目作者: liuzhang

项目描述 :
基于swoole httpserver 的小型框架。练习 swoole
高级语言: PHP
项目地址: git://github.com/liuzhang/bricks.git
创建时间: 2018-04-05T08:42:45Z
项目社区:https://github.com/liuzhang/bricks

开源协议:

下载


bricks

基于swoole httpserver 的小型框架。练习 swoole

使用说明

  • 依赖说明:
    • PHP 版本 5 以上
    • swoole 版本 >= 1.9.5
  • 启动服务:
    git clone 下载下来,进入 bin 目录, start 启动,stop 停止, restart 重启

    1. ./httpd.php start

    直接访问 127.0.0.1:9501,如果出现 hello world 表示成功。

  • Nginx 代理配置:

    1. server {
    2. server_name www.test.com;
    3. listen 80;
    4. index index.html;
    5. location = / {
    6. rewrite ^(.*)$ /index last;
    7. }
    8. location / {
    9. proxy_http_version 1.1;
    10. proxy_set_header Connection "keep-alive";
    11. proxy_set_header Host $http_host;
    12. proxy_set_header X-Real-IP $remote_addr;
    13. if (!-e $request_filename) {
    14. proxy_pass http://127.0.0.1:9501;
    15. }
    16. }
    17. }

其他

  • 有兴趣的可以研究,欢迎使用反馈。