1. Home
  2. Security Hardening
  3. CIS Nginx Benchmark V1.0.0 L1 Webserver
  4. Ensure error logging is enabled and set to the info logging level

Ensure error logging is enabled and set to the info logging level

Details

All errors for applications should be logged.

Rationale:

Error logging can be useful in identifying an attacker attempting to exploit a system and recreating an attacker’s steps. Error logging also helps with identifying possible issues with an application.

Solution

Edit /etc/nginx/nginx.conf so the error_log directive is present and not commented out. The error_log should be configured to the logging location of your choice. The configuration should look similar to the below:

error_log /var/log/nginx/error.log info;

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Audit and Accountability.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles