修改nginx配置文件后,
先执行:/usr/local/nginx/sbin/nginx -t 检查配置是否正常,
如果显示:the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
则正常,否则按错误提示修改配置。
然后
/etc/init.d/nginx restart
进行重启就可以了。
这样系统会在保持支行状态下平滑重启nginx.

1 评论
添加评论