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

  • 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.

主站蜘蛛池模板: 盐山县| 嘉祥县| 宁津县| 浮山县| 宁夏| 筠连县| 南昌市| 昭通市| 伊宁县| 鄯善县| 天柱县| 莱阳市| 开封市| 铁岭市| 三亚市| 奉新县| 南昌县| 枣强县| 苍溪县| 禹城市| 吴忠市| 东方市| 翼城县| 绥江县| 万载县| 邯郸县| 乌鲁木齐县| 江北区| 达拉特旗| 鸡西市| 荔波县| 大丰市| 昭平县| 汪清县| 双牌县| 陆良县| 卢龙县| 灯塔市| 商城县| 金塔县| 城步|