Skip to content

4511-nginx-errorlog - Ensure NGINX Error Logging Is Enabled

Rule ID

  • 4511-nginx-errorlog

Category

  • nginx

Level

  • info

Compatible Versions

  • Linux

Description

  • NGINX should log all error logs. This is enabled by default.

Scan Frequency

  • 0 */30 * * *

Rationale

  • Error logging can be used to identify attackers attempting to exploit the system and to reconstruct the attacker's steps. Error logging also helps identify potential issues within the application.

Risk Item

  • NGINX Security

Audit Method

  • Run the following command to verify:
grep error_log /etc/nginx/nginx.conf
# The output should be:
error_log /var/log/nginx/error.log info;

Remediation

  • Edit the file /etc/nginx/nginx.conf. Example:
error_log /var/log/nginx/error.log info;

Impact

  • None

Default Value

  • By default, error logging is enabled.

References

  • None

CIS Controls

  • None

Feedback

Is this page helpful?