Nginx Learning Note 1

Source: Internet
Author: User

View Nginx compile-time parameter settings use the NGINX-V command to view

You can use the nginx-h command to view command Help

The configuration file binds the worker process to a specific core of the CPU, vim/etc/nginx/nginx.conf

Note that the Worker_cpu_affinity parameter is support for CPU multicore, which indicates that 4 process is bound to the 1th 2nd 1th 2nd of the CPU core (this CPU has only two cores)

If you have 4 cores, set this up.

In order to push the 8,16 ...

Worker_rlimit_nofile This parameter in the configuration file is to set the maximum number of file descriptors that a single worker process can open (should be consistent with the value of Ulimit-n because Nginx is sometimes unbalanced for user requests), However, such services as Nginx and Haproxy have been automatically adjusted to their own needs.

Worker_priority This parameter is to set the process priority of the worker process to a range of [-20 19], the lower the value, the higher the priority, you can use the PS Axo comm,pid,nice command to view

Use Epoll This parameter does not have to be defined, Nginx will automatically select.

Define a virtual host the simplest non-way

root specifies the root file path, server_name specifies the server hostname, and the format after the Listen parameter is Ip:port, which is specified as 80 ports for listening on all network card addresses

Nginx Learning Note 1

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.