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

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

主站蜘蛛池模板: 逊克县| 临朐县| 综艺| 阿坝| 织金县| 马关县| 诸城市| 陵川县| 饶平县| 商水县| 五台县| 达孜县| 梅河口市| 沙湾县| 南平市| 象州县| 合川市| 固阳县| 上栗县| 九龙坡区| 化德县| 盱眙县| 金坛市| 河南省| 旌德县| 南昌市| 含山县| 沈丘县| 泗水县| 新丰县| 洞口县| 大新县| 台江县| 潮安县| 无锡市| 宣武区| 宜宾市| 赤壁市| 法库县| 珲春市| 共和县|