Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of nginx php-cgi automatic shutdown

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "how to solve the problem of automatic closing of nginx php-cgi". In daily operation, I believe many people have doubts about how to solve the problem of automatic closing of nginx php-cgi. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to solve the problem of automatic closing of nginx php-cgi". Next, please follow the editor to study!

The solution to the automatic shutdown of nginx php-cgi: 1, download nssm;2, extract it, and enter the location of nssm.exe; 3, execute "nssm install" and set the path and parameters; 4, open the service.

This article operating environment: Windows7 system, PHP7.3.1 version, DELL G3 computer

How to solve the problem of nginx php-cgi automatic shutdown?

Solve the problem of automatic exit of nginx+php-cgi in windows environment:

In the windows environment, I build the PHP environment like this:

1. Start nginx

two。 Start the php-cgi process

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

How to solve?

The idea is to write a daemon to daemon so that it restarts automatically after it is hung up.

How to achieve it?

Use nssm to encapsulate php-cgi.exe into a service so that it is guarded.

Steps:

1. Download nssm at http://www.nssm.cc/download

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

3. Execute nssm install, set paths and parameters

4. Start the service

It's done, and from then on, running nginx+php under windows is as slippery as Dev.

At this point, the study on "how to solve the problem of automatic shutdown of nginx php-cgi" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report