4511-nginx-errorlog - Ensure NGINX Error Logging Is Enabled
Rule ID
Category
Level
Compatible Versions
Description
- NGINX should log all error logs. This is enabled by default.
Scan Frequency
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
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;
- Edit the file
/etc/nginx/nginx.conf. Example:
error_log /var/log/nginx/error.log info;
Impact
Default Value
- By default, error logging is enabled.
References
CIS Controls