0
0
Nginxdevops~5 mins

Main configuration file (nginx.conf) - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the nginx.conf file?
The nginx.conf file is the main configuration file for the NGINX web server. It controls how NGINX behaves, including server settings, modules, and how requests are handled.
Click to reveal answer
beginner
Name the main blocks inside nginx.conf.
The main blocks are: events (handles connection processing), http (handles web traffic), and server (defines virtual hosts).
Click to reveal answer
beginner
What does the worker_processes directive control?
It sets how many worker processes NGINX will run. More workers can handle more connections, like having more cashiers in a store to serve customers faster.
Click to reveal answer
beginner
Explain the role of the server block in nginx.conf.
The server block defines a virtual server. It tells NGINX how to respond to requests for a specific domain or IP, including ports, root folders, and rules.
Click to reveal answer
beginner
How do you reload NGINX after changing nginx.conf without downtime?
Use the command nginx -s reload. This tells NGINX to apply changes smoothly without stopping the server, like changing a light bulb without turning off the room.
Click to reveal answer
Which block in nginx.conf handles web traffic settings?
Ahttp
Bevents
Cserver
Dlocation
What does the worker_connections directive specify?
ANumber of worker processes
BNumber of connections each worker can handle
CPort number for the server
DTimeout for client connections
Where do you define the root folder for your website in nginx.conf?
AInside the <code>http</code> block only
BInside the <code>events</code> block
CIn the <code>worker_processes</code> directive
DInside the <code>server</code> block
What command reloads NGINX configuration without downtime?
Anginx -s reload
Bnginx -s stop
Cnginx -s start
Dnginx -s restart
Which directive controls how many worker processes NGINX runs?
Aserver_name
Bworker_connections
Cworker_processes
Dlisten
Describe the main sections of the nginx.conf file and their roles.
Think of how NGINX organizes its tasks like a team with different roles.
You got /3 concepts.
    Explain how to safely apply changes made to nginx.conf without stopping the web server.
    Imagine changing a part of a machine while it keeps running.
    You got /3 concepts.