NGINX - What is the difference between a 'block directive' and a 'context'?

Viewed 160

From NGINX's Beginner's Guide, it says:

A block directive has the same structure as a simple directive, but instead of the semicolon it ends with a set of additional instructions surrounded by braces ({ and }). If a block directive can have other directives inside braces, it is called a context (examples: events, http, server, and location).

Therefore, the following entry in the nginx.conf can be deemed as both a block directive and also a context:

events {
    worker_connections 1024;
}

This means a context will always be a block directive, but are there any examples of when a block directive is not a context? If not, does that mean I can use the term 'block directive' and 'context' interchangeably?

0 Answers
Related