The server_tokens directive appears twice in nginx-craft/sites-available/somedomain.com.conf in the 'Primary virtual host server block'.
To reproduce
Add the vhost configuration to nginx
Run nginx -t
Receive error: nginx: [emerg] "server_tokens" directive is duplicate in /etc/nginx/sites-enabled/<name>:90
Expected behaviour
This seems like an inadvertent error because both the server_tokens directives have the same value (off), so the expected behaviour would be to only have one directive and not fail nginx's config validation.
Describe the bug
The
server_tokens
directive appears twice innginx-craft/sites-available/somedomain.com.conf
in the 'Primary virtual host server block'.To reproduce
nginx -t
nginx: [emerg] "server_tokens" directive is duplicate in /etc/nginx/sites-enabled/<name>:90
Expected behaviour
This seems like an inadvertent error because both the
server_tokens
directives have the same value (off
), so the expected behaviour would be to only have one directive and not fail nginx's config validation.Screenshots
Error observed in CLI
Versions