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

What are the common commands of nginx?

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "what are the common commands in nginx". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the common commands of nginx"?

Nginx supports two command modes, one is the nginx command, which is in the following format:. / ngin-parameter, and the other is the kill command by operating the nginx main process ID

Nginx command

Execute under the nginx/sbin directory:

Sudo. / sbin/nginx # starts. / nginx-v # displays the nginx version. / nginx-V # shows the nginx version, compiler version and configuration parameter-c # specifies a configuration file for Nginx instead of the default conf/nginx.conf./nginx-t # to test the syntax correctness of the configuration file

-s command

. / nginx-s: stop # quickly close the service. / nginx-s: quit # shut down the service calmly # wait for all requests to finish and then shut down the service. / nginx-s: reload # reload the configuration file without stopping service. / nginx-s: reopen # reopen the log # if the log file does not exist, the log file control signal command (kill)

. / logs/nginx.pid file contains the main process number, or you can check the main process number through ps-ef | grep nginx

Kill-HUP main process number # reload configuration file kill-USR1 main process number # reopen the log file # if the log file does not exist, the log file kill-USR2 main process number # smooth upgrade kill-TERM main process number # Quick shutdown # you can also use the kill-INT main process number Kill-9 main process number kill-QUIT main process # calmly shut down the kill-WINCH main process # calmly shut down # wait for all requests to end and shut down the service here I believe that you have a deeper understanding of "what are the common commands in nginx"? you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Internet Technology

Wechat

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

12
Report