Nginx itself does not own the PHP processing module, so you need to configure the reverse proxy, the PHP request to the other PHP parser execution, and then return the results to Nginx.
The current fashion is to use fast-cgi to configure PHP processing services. Its advantages are relatively concise, server load light. But the disadvantage is also obvious: unable to view the PHP processing status.
For example, sometimes the site because the load is too high, PHP processing threads have all blocked, it will cause the site can no longer respond to PHP services. Using the FastCGI method, you cannot see which scripts are processing too long and block the PHP processing thread.
The advantage of Apache is that it's good to see which PHP scripts are processing too long and block the number of active processes.
The following is the way Nginx uses Apache PHP to handle the background:
Configure Apache to run correctly on port 8001.
Modify Nginx Virtual host configuration and other PHP scripts to be parsed by Apache
Restart Nginx and Apache
Note that if you want to see the processing status of PHP, you can install the Apache monitoring module.
Nginx uses Apache PHP to handle the background