🌍nginx.conf
Also known as Nginx Configuration File, Nginx Config File
The main settings file for Nginx. It holds short rules grouped in blocks.
Think of it like
It is like the rules on a kitchen wall. All the cooks follow them. Change one, and the whole kitchen changes.
Example
Emma raises the upload limit for her whole server. She adds one line to the http block, runs a test and reloads.
Why it matters
Definition
Example code
nginx
http {
client_max_body_size 20m;
include /etc/nginx/sites-enabled/*;
}Common mistake
Key takeaways
- 1Directives. Each one ends in a semicolon.
- 2Blocks. http holds server, server holds location.
- 3Test first. Run nginx -t before a reload.