Home > Article > Backend Development > Curl access local timeout in PHP + Nginx environment
PHP + Nginx curl access local timeout under windows. The above reason occurs because the nginx+php environment under windows does not support concurrency. When accessing multiple domain names at the same time and pointing to your local service at the same time, concurrency is not supported.
Solution:
1.nginx.conf Modify the port number of fastcgi_pass for different servers
Example: fastcgi_pass 127.0.0.1:9000;
fastcgi_pass 127.0.0.1:9001 ;
2. Start multiple php-cgi
Open the cmd command line and run: your path/php-cgi.exe -b 127.0.0.1:9000 -c your path/php .ini (cannot close the window)
Open a new command line window: Your path/php-cgi.exe -b 127.0.0.1:9000 -c Your path/php.ini (Cannot close the window)
Is it troublesome to use the cmd command line window above? You cannot close the window. It will be a tragedy if you don’t pay attention.
You can use the following small tool: RunHiddenConsole
First you need to download a small file RunHiddenConsole and then copy it to the nginx directory, create two new batch files, start_nginx.bat and stop_nginx.bat
Note: RunHiddenConsole.exe It must be in the same directory as the two batch files, otherwise nginx cannot start.
The above is the detailed content of Curl access local timeout in PHP + Nginx environment. For more information, please follow other related articles on the PHP Chinese website!