Introduction to common nginx commands

王林
Release: 2020-06-17 16:59:55
forward
3426 people have browsed it

Introduction to common nginx commands

nginx common commands:

View version number

nginx -v
Copy after login

View nginx compiled parameters

nginx -V
Copy after login

Restart gracefully and reload Enter the configuration file

nginx.conf/usr/local/nginx/sbin/nginx -s reload
Copy after login

Stop nginx gracefully. When there is a connection, it will wait for the connection request to complete before killing the worker process

/usr/local/nginx/sbin/nginx -s quit
Copy after login

The specific commonly used commands are as follows:

nginx -s stop 快速关闭Nginx,可能不保存相关信息,并迅速终止web服务。 nginx -s quit 平稳关闭Nginx,保存相关信息,有安排的结束web服务。 nginx -s reload 因改变了Nginx相关配置,需要重新加载配置而重载。 nginx -s reopen 重新打开日志文件。 nginx -c filename 为 Nginx 指定一个配置文件,来代替缺省的。 nginx -t 不运行,仅测试配置文件。nginx 将检查配置文件的语法的正确性,并尝试打开配置文件中所引用到的文件。 nginx -v 显示 nginx 的版本。 nginx -V 显示 nginx 的版本,编译器版本和配置参数。
Copy after login

At the same time, Note that there is nonginx -s startcommand in nginx.

Recommended tutorial:nginx tutorial

The above is the detailed content of Introduction to common nginx commands. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.im
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!