Opened 4 months ago
nginx -t doesn‘t complain about wrongly formatted server_name directive
|Reported by:||Owned by:|
|uname -a:||Linux 4.15.0-66-generic x86_64 GNU/Linux|
nginx version: nginx/1.14.0 (Ubuntu)
built with OpenSSL 1.1.1 11 Sept 2018
Recently I was setting up a server and I made a mistake:
server_name: www.example.com, test.example.com;
The comma is wrong, but I didn‘t notice. I ran nginx -t and it reported „Syntax is ok“ .
Afterwards I spent some time to find out why it didn‘t work.
If the the value of a directive appears to be a comma separated list, nginx -t shoudl throw a warning.