Answer the question
In order to leave comments, you need to log in
What is the working mechanism of nginx + php-fpm?
I noticed when using file_get_contents, curl, get_headers and some others that nginx behaves strangely.
The script is called twice.
For example:
file_get_contents(' example.com ');
exec('wget example.com > /tmp/');
As a result, 2 files ...
This is not observed on Apache.
Worker processes in the nginx 4 config, running from the user.
Suspicions fall on accelerated upload in php-fpm, but still, I still don’t understand where to look for the reason.
Answer the question
In order to leave comments, you need to log in
if you're testing everything in the browser, and you've configured to redirect to php-fpm all requests for which no files were found, then most likely the second request is caused by the browser when it wants to get a favicon.
In general, bring the nginx config and make sure that the browser does not make two requests to the server (in the debug panel).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question