Getting Started with Nginx

Source: Internet
Author: User

1,Nginx (Engine x): HTTP and reverse proxy server, mail proxy Server, general TCP/UDP Proxy Server.

2. Nginx Process

  Nginx has a master process and several worker processes. The primary task of the master process is to read and examine the configuration and maintain worker processes, which are responsible for processing requests. Nginx uses an event-based model and an OS-dependent mechanism to effectively distribute requests in worker processes.

After booting, the nginx-s signal can be used to control the nginx,signal with stop (fast shutdown), quit (Graceful shutdown: Wait until the worker process finishes processing the request and then stop the nginx process), reload (reload the configuration), Reopen (reopen the log file).

When the master process receives a reload signal, it checks the syntax and attempts to apply the new configuration. If successful, the master process starts a new worker process and requests the old worker process to exit (stop accepting new connections and continue processing existing requests until completed); otherwise, the master process rolls back the configuration.

You can also send a signal to the Nginx process with UNIX kill. For example, send a quit signal to the master process (PID 1628): Kill-s quit 1628.

The PID of the master process is saved by default in the Nginx.pid (/usr/local/nginx/logs or/var/run directory).

3. Configuration files

Resources:

http://nginx.org/

Continue to learn in ...

Getting Started with Nginx

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.