I'm using the set directive as described in the nginx doc but I keep getting this error:
nginx_1 | 2016/09/13 15:06:08 [emerg] 8#8: invalid number of arguments in "set" directive in /etc/nginx/conf.d/default.conf:9
nginx_1 | nginx: [emerg] invalid number of arguments in "set" directive in /etc/nginx/conf.d/default.conf:9
default.conf :
server {
set $dn "foo.dnsalias.net";
...
}
I've tried both with and without quotes, with no change.
I'm using nginx version 1.10.1
Does anyone know what the issue is?
In your snippet you have
server {
set $dn "foo.dnsalias.net";
...
}
However, if in your actual conf file you are missing a trailing semicolon ;
after the set
directive, the directive will not be terminated and text on the next line will be treated as additional arguments, which will trigger your error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With