Common Nginx operations

Source: Internet
Author: User
: This article mainly introduces common Nginx operations. For more information about PHP tutorials, see. 1. start Nginx

Common startup methods: [root @ Admin/] #/opt/nginx/sbin/nginx specify the startup mode: [root @ Admin/] #/opt/nginx/sbin/nginx-c/opt/nginx/conf/nginx. conf

2. stop Nginx

Stop nginx quickly: [root @ Admin/] #/opt/nginx/sbin/nginx-s stop nginx in an orderly manner: [root @ Admin/] #/opt/nginx/sbin/nginx-s quit other signal stop nginx: [root @ Admin/] # ps-ef | grep nginx: query the Nginx master process number [root @ Admin/] # kill-QUIT master process number: stop Nginx [root @ Admin/] # kill-TERM Master process number calmly: stop Nginx [root @ Admin/] # kill-INT master process number: stop Nginx [root @ Admin/] # pkill-9 nginx: force stop Nginx

3. reload the configuration

After modifying the configuration file, verify that the configuration file is correct: [root @ Admin/] #/opt/nginx/sbin/nginx-t-c/opt/nginx/conf/nginx. confnginx: the configuration file/opt/nginx/conf/nginx. conf syntax is oknginx: configuration file/opt/nginx/conf/nginx. conf test is successful modify the configuration and then reload it to take effect: [root @ Admin/] #/opt/nginx/sbin/nginx-s reload or when you send a pending signal (Signal 1 or HUP, most server processes (all common processes) will reset and reload their configuration files: [root @ Admin/] # kill-HUP master process number

4. common Nginx signal control

Kill-HUP master process no.: restart kill-QUIT master process no.: kill-TERM Master process no.: kill-INT master process no: kill-USR1 master process no.: switch the log file kill-USR2 master process no.: smooth upgrade of executable process kill-WINCH worker process no.: calmly close the worker process

'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
  • '). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script

    The above describes the common operations of Nginx, including some content, and hope to help those who are interested in the PHP Tutorial.

    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.