How to solve the problem of nginx php-cgi automatically closing

藏色散人
Release: 2023-03-13 13:42:01
Original
3180 people have browsed it

nginx php-cgi automatic shutdown solution: 1. Download nssm; 2. Unzip it and enter the location of nssm.exe; 3. Execute "nssm install" and set the path and Parameters; 4. Start the service.

How to solve the problem of nginx php-cgi automatically closing

The operating environment of this article: Windows7 system, PHP7.3.1 version, DELL G3 computer

How to solve nginx php- cgi automatic shutdown problem?

Solve the problem of nginx php-cgi automatically exiting in the windows environment:

In the windows environment I am This is how to build the PHP environment:

1. Start nginx

2. Start the php-cgi process

There will be a problem. When the request exceeds a certain number of times, php-cgi will hang up

##How to solve?

The idea is to write a daemon process to protect it so that it can automatically restart after hanging up.

How to achieve?

Use nssm to encapsulate php-cgi.exe into a service so that it can be protected.

Steps:

1.

Downloadnssm, download address: http:// www.nssm.cc/download

2.

Extract it and enter the location where nssm.exe is located

3.

Executenssm install , set the path and parameters

4. Start the service

##You're done, running nginx php under windows is as smooth as Dove.

Recommended learning: "

PHP Video Tutorial

"

The above is the detailed content of How to solve the problem of nginx php-cgi automatically closing. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template