c - nginx中是怎么调起phpfpm去执行php文件的?
淡淡烟草味
淡淡烟草味 2017-05-16 13:10:24
0
2
581

我们都知道nginx解析到php请求会把这个请求转给fpm来处理,我想自己写个简单的web服务器,然后现在也能解析到是php请求,就是对于怎么像nginx那样把请求传递给fpm然后接收fpm的处理返回信息这块儿不太明白,粗略的看了下nginx的源代码也没找到这块儿相关的代码,所以请大家帮忙给个简单的demo示例或者有知道nginx这块儿的代码在哪个位置的也行,我自己去看

淡淡烟草味
淡淡烟草味

reply all(2)
漂亮男人

What you need to understand is the CGI and FastCGI protocols. Just like the HTTP protocol used between the browser and Nginx, the FastCGI protocol is used to communicate between Nginx and PHP-FPM.

巴扎黑

A simple WebServer Demo https://github.com/zhoumengka... The original poster can refer to this idea

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!