Chapter 2. Searching for Problems in Log Files
Nginx really is a breakthrough technology powering a great part of modern Web. And as with all great technologies, it stands on the shoulders of giants. Nginx would not be possible without Apache. One very important Unix tradition that Nginx embraces fully is thorough logging.
Logs are what you turn to the moment there is a problem with your Nginx instance. For a daemon, there are not really many ways to communicate its state to the administrator in a simple, reliable, and guaranteed to work way other than logs.
You will find the following topics in this chapter:
- A comprehensive description of how Nginx logging is configured and what mistakes could be made in the configuration
- A special section on how to log POST request bodies
- A section on how log rotation works and why there is some potential for problems
- A series of real-life error records from logs with analysis