I. Overview
Before learning Nginx, let's first talk about the problem of Nginx's process structure.
Nginx is a standard master-worker model.
In Nginx, the main task of the master process is to complete the forwarding of the task, forward the request to the appropriate worker process, and then workwe the process to complete the specific task.
Now we can get a simple look at Nginx's simple model.
Two. Configuration files
In Nginx, there are a few of the configuration files that we need to use in the future, so let's start by familiarizing ourselves with these configuration files.
In the above figure, we can see a few of our configuration files.
[1]mime.type: This configuration file is the completion of the MIME configuration, when we appear in the new MIME format, we can use this configuration file to configure the MIME.
[2]nginx.conf: This is the nginx core configuration file, we will often use this configuration file later.
[3]nginx.conf.default: This is the default configuration of Nginx, in the main configuration file, the configuration file will be automatically loaded.
Three. Basic Configuration Instructions
In Nginx, our use is basically in the configuration file, if we use these configuration files, we need to understand the basic way of configuration.
In Nginx, it is carried out according to the module. Therefore, we need to configure the configuration file in the same way as the module.
In addition, in Nginx, there is a concept of configuration variables, we can use these configuration variables to complete a more powerful configuration.
Therefore, a large number of configurations are accompanied by our use of nginx, so we need to follow the instructions given in the official documentation to learn.
The process structure and basic configuration of 002 Nginx