what's the _
meaning in nginx?
in a nginx.conf I see this config:
listen 8080;
server_name _;
what's the _
meaning?
From the documentation:
There is nothing special about this name, it is just one of a myriad of invalid domain names which never intersect with any real name. Other invalid names like “--” and “!@#” may equally be used.
With current versions of Nginx, it is perfectly valid to remove the server_name
directive from the server
block, rather than specify it with a fake name.
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