Common operation of Nginx

Source: Internet
Author: User
1, the start of Nginx

常用启动方式:[root@Admin /]# /opt/nginx/sbin/nginx 指定配置启动方式:[root@Admin /]# /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf

2, the Nginx stop

快速停止nginx:[root@Admin /]# /opt/nginx/sbin/nginx -s stop完整有序的停止nginx:[root@Admin /]# /opt/nginx/sbin/nginx -s quit其他的信号停止nginx的方式:[root@Admin /]# ps -ef|grep nginx    :查询Nginx主进程号[root@Admin /]# kill -QUIT 主进程号    :从容停止Nginx[root@Admin /]# kill -TERM 主进程号    :快速停止Nginx[root@Admin /]# kill -INT主进程号      :从容停止Nginx[root@Admin /]# pkill -9 nginx       :强制停止Nginx

3. Reload the configuration

修改配置文件后要先验证配置文件是否正确:[root@Admin /]# /opt/nginx/sbin/nginx -t -c /opt/nginx/conf/nginx.confnginxis oknginxis successful修改配置后重新加载生效:[root@Admin /]# /opt/nginx/sbin/nginx -s reload1 或 HUP)时,大多数服务器进程(所有常用的进程)都会进行复位操作并重新加载它们的配置文件:[root@Admin /]# kill -HUP 主进程号

4, nginx commonly used signal control

kill -HUP 主进程号      :重启kill -QUIT 主进程号     :从容关闭kill -TERM 主进程号     :快速关闭kill -INT 主进程号      :从容关闭kill -USR1 主进程号     :切换日志文件kill -USR2 主进程号     :平滑升级可执行进程kill -WINCH 工作进程号   :从容关闭工作进程

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the common operation of Nginx, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.