I want to understand how the web server (ex: nginx) and cgi / fastcgi communicate with each other. How the web server passes the cgi script to the cgi process and how the cgi process responds to the request.
In Nginx, we set it up so that nginx passes php-fpm php scripts
location / {
root /home/service/public_html;
fastcgi_pass unix:/tmp/php-fpm-test.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/service/public_html/index.php;
include fastcgi_params;
}
How it works?
Change: . It would be nice if someone could give me a piece of pseudocode to describe the connection between the process (or any other) and the juice php-fpm unix file.
source
share