4510-nginx-accesslog - Ensure NGINX Enables Access Log Recording
Rule ID
Category
Level
Compatible Versions
Description
- Each core site should have an access_log directive. It is enabled by default.
Scan Frequency
Theoretical Basis
- Access log recording allows incident responders and auditors to investigate system access permissions when events occur
Risk Items
Audit Method
- Execute the following command to verify:
grep -ir access_log /etc/nginx
# The output should be
access_log /var/log/nginx/host.access.log main;
# If the output is as follows, it is recommended to close and add a log path
access_log off;
- Edit the file /etc/nginx/nginx.conf example:
access_log /var/log/nginx/host.access.log main;
Impact
Default Value
- By default, access logging is enabled
References
CIS Controls