美文网首页
Thinkphp使用workman加速

Thinkphp使用workman加速

作者: Chting | 来源:发表于2024-04-08 10:26 被阅读0次

启动worker

默认是2346端口

php think xadmin:worker

配置域名代理

server
{
    listen 80;
    server_name testapi.demo.com;

    location / {
        proxy_pass http://127.0.0.1:2346;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        add_header Access-Control-Allow-Headers "*";
    }
    
    access_log  /www/wwwlogs/testapi.demo.com.log;
    error_log  /www/wwwlogs/testapi.demo.com.error.log;

}

相关文章

网友评论

      本文标题:Thinkphp使用workman加速

      本文链接:https://www.haomeiwen.com/subject/dwtxxjtx.html