PHP + nginx environment with Curl access local timeout

Source: Internet
Author: User
Windows PHP + Nginx Curl accesses the local timeout, which occurs because of the nginx+php environment under windows and does not support the cause of concurrency. Concurrency is not supported when you access multiple domain names at the same time and point to your local service.

Workaround:

1.nginx.conf Change the port number of the Fastcgi_pass to a different server
Example: Fastcgi_pass 127.0.0.1:9000;
Fastcgi_pass 127.0.0.1:9001;

2. Start multiple php-cgi
Open cmd command line 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)

The above with the CMD Command Line window is not very troublesome, not to close the window, a little less attention on the tragedy

You can use one of the following gadgets: Runhiddenconsole

First you need to download a small file runhiddenconsole then copy to the Nginx directory, create a new two bat batch file, Start_nginx.bat and Stop_nginx.bat

Note: RunHiddenConsole.exe must be with two batch files in the same level directory, otherwise nginx can not start.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.