4511-nginx-errorlog - Ensure NGINX Enables Error Access Logging
Rule ID
Category
Level
Compatible Versions
Description
- NGINX should log all error logs. It is enabled by default.
Scan Frequency
Theoretical Basis
- Error logging can be used to identify attackers attempting to exploit the system and recreate the steps taken by the attacker. Error logging also helps identify issues that may arise in the application
Risk Items
Audit Method
- Execute 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 as follows:
error_log /var/log/nginx/error.log info;
Impact
Default Value
- By default, access logging is enabled
References
CIS Controls