Nginx Basic operation and maintenance

Source: Internet
Author: User
Nginx Start-up

nginx -c /path/to/nginx.conf

Nginx Restart

# 重新加载配置-s reload# 重新打开日志文件-s reopen# 平滑重启kill -HUP 主进程号

Nginx's Stop

# 从容停止kill -QUIT 主进程号# 快速停止kill -TERM 主进程号# 强制停止kill -9 主进程号

Nginx detection configuration is correct

nginx -t

Nginx Upgrade

    1. Replace old program files with new programs first
    2. KILL-USR2 The main process number of the legacy program. Old Process Auto Rename
    3. Executes the new version of the binaries. Two processes process requests at the same time.
    4. Kill-winch the old version main process number. The old process is not receiving requests at this time, and new processes are being processed

Below, you can keep a new or old process by observing whether it is running normally.
Keep the old process:

    1. Kill-hup the old master process number
    2. Kill-quit the new main process number

Keep New processes

    1. Kill-quit the old master process number

'). 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 Nginx basic operations, 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.