Score:0

What is meant by 'main' level of NGINX configuration for debug configuration purposes?

ls flag

The NGINX documentation on configuring debug logging refers to a 'main' level of the config e.g. on the following page:

https://docs.nginx.com/nginx/admin-guide/monitoring/debugging/#enabling-debug-logging-in-nginx-configuration

It is recommended enabling the debugging log on the ”main“ level of NGINX configuration to get the full picture of what’s going on.

What exactly is the 'main' section? Within the 'http' block? Right at the top of nginx.conf? Or is inside 'server' enough if you only have a single server block?

jp flag
The docs you linked have examples of the usage.
Richard Smith avatar
jp flag
The `main` context is outside of the `http` context. If an error occurs before Nginx decides that it is processing an http request (for example, when starting up) it will use the definition of error log from the main context. If there isn't one, it will use the [default value](https://nginx.org/en/docs/ngx_core_module.html#error_log).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.