SV-278395r1172748_rule
V-278395
SRG-APP-000266
NGNX-APP-001070
CAT II
10
Determine the path to NGINX config file(s):
# nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Add or modify the "server_tokens" directive to set to "off" or set to a custom string without the version information.
http {
server_tokens off;
...
}
Restart nginx after modifying the configuration:
# nginx -s reload
Determine the path to NGINX config file(s):
# nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Verify that the "server_tokens" directive is present, is not set to "on", and is not set to a custom string that identifies version information.
nginx -c <path to nginx config> -qT | grep server_tokens
server_tokens off;
If the "server_tokens" directive is missing, this is a finding.
If the "server_tokens" directive is set to "on", this is a finding.
If the "server_tokens" directive includes the version number, this is a finding.
V-278395
False
NGNX-APP-001070
Determine the path to NGINX config file(s):
# nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Verify that the "server_tokens" directive is present, is not set to "on", and is not set to a custom string that identifies version information.
nginx -c <path to nginx config> -qT | grep server_tokens
server_tokens off;
If the "server_tokens" directive is missing, this is a finding.
If the "server_tokens" directive is set to "on", this is a finding.
If the "server_tokens" directive includes the version number, this is a finding.
M
5720