Configuring advanced logging
Under normal circumstances, we want logging to be as minimal as possible. Usually, what's important is which URIs were called by which clients and when, and if there was an error, to show the resulting error message. If we want to see more information, this leads into a debug logging configuration.
To activate debug logging, the
nginx binary needs to have been compiled with the
--with-debug configure flag. As this flag is not recommended for high performance production systems, we may want to provide two separate
nginx binaries for our needs: the one that we use in production, and the one that has all the same compile-time flags (options given to the configure script), with the addition of