Chapter 2. Configuring Core Modules

In this chapter we will explore the configuration of the Main and Events modules of Nginx, which are also called the core modules. We will discuss the module-related configuration options and important points that one needs to remember while using these options.

Understanding the Main module

The Nginx Main module consists of the following configuration directives or commands:

Name

Value

Default

Example

daemon

on, off

on

 

master_process

on, off

on

 

timer_resolution

interval

0

100ms

pid

file

logs/nginx.pid

/var/log/nginx.pid

lock_file

file

logs/nginx.lock

/var/log/nginx.lock

worker_processes

number, auto

1

2

debug_points

stop, abort

null

stop

user

user [group]

nobody nobody ...

Get Nginx Module Extension now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.