Home>Article>Operation and Maintenance> How to restart nginx service

How to restart nginx service

藏色散人
藏色散人 Original
2019-06-10 09:53:18 16497browse

How to restart nginx service

怎么重启nginx服务?

1、验证nginx配置文件是否正确

方法一:进入nginx安装目录sbin下,输入命令./nginx -t

看到如下显示

nginx.conf syntax is ok nginx.conf test is successful

说明配置文件正确!

How to restart nginx service

方法二:在启动命令-c前加-t

How to restart nginx service

2、重启Nginx服务

方法一:进入nginx可执行目录sbin下,输入命令./nginx -s reload 即可

How to restart nginx service

方法二:查找当前nginx进程号,然后输入命令:kill -HUP 进程号 实现重启nginx服务

How to restart nginx service

更多Nginx使用教程知识,请访问Nginx使用教程栏目!

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

Statement:
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