This document discusses common mistakes made in NGINX configuration and provides solutions. It covers:
1. Not setting enough file descriptors, which can cause application errors and error log entries. The recommended baseline is to set the max file handles to 2x the worker_connections.
2. Using the root directive inside location blocks, which is not secure. The root directive should be set at the server level and inherited.
3. Using the if directive in location contexts, which can cause problems and even crashes. It is better to use alternatives like try_files.
4. Confusion around directive inheritance, where directives are inherited "outside in." Array directives like add_header can unexpectedly override inherited values