Blogger Information
Blog 6
fans 19
comment 0
visits 4812
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
如何平滑重启nginx
听鱼说php教学博客
Original
1017 people have browsed it

平滑重启nginx指令如下:


/usr/local/nginx/sbin/nginx -t //测试nginx配置文件是否正确

pkill -9 nginx;/usr/local/nginx/sbin/nginx // 平滑重启




对于nginx的平滑重启的应用场景是非常常见的。我自己的服务器上常常会对ngix配置文件进行修改,比如增加虚拟主机vhost的配置,而这些配置又需要重启nginx才能生效。

对于一个跑着很多在线项目的nginx,对重启是有要求的,我们不可能已关闭的形式来重启一个服务。所以nginx的平滑重启是非常好的一个解决方式。


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post