官术网_书友最值得收藏!

  • NGINX Cookbook
  • Tim Butler
  • 173字
  • 2021-07-03 00:04:20

How it works...

Here are a few of the key configuration items. Firstly, user nginx defines the user in which NGINX will run as. This is important to note if you have a server-side script which requires the ability to write files and a user will also require permission to read the files.

Secondly, worker_processes sets the number of worker processes that NGINX will start. While a default of 1 doesn't sound very high, the event-driven nature means that this certainly won't be a limitation initially. The optimal number of processes depends on many factors, but an easy starting reference is to go by the number of CPU cores your server has.

Next, worker_connections is the maximum amount of simultaneous connections that a worker process can open. In the default configuration, this is set to 1024 concurrent connections.

Lastly, the include /etc/nginx/conf.d/*.conf; line tells NGINX to load all of the .conf files as if they were all part of the main nginx.conf file. This allows you to separate the configuration for different sites.

主站蜘蛛池模板: 菏泽市| 山丹县| 乳山市| 缙云县| 泸定县| 广元市| 湖南省| 巍山| 兴城市| 永清县| 曲沃县| 同德县| 加查县| 柘城县| 涿州市| 铜梁县| 高密市| 和龙市| 德兴市| 靖安县| 永嘉县| 萝北县| 石河子市| 昌乐县| 社会| 虹口区| 加查县| 平利县| 南投市| 南和县| 宁波市| 桐庐县| 迁安市| 芜湖县| 津市市| 阜康市| 贵溪市| 瑞金市| 阿瓦提县| 威信县| 宜城市|