If a request on the IP or on a domain without a matching server_block
comes in then Nginx will either choose the server block with
default_server flag in listen or the first one defined.
Question is, is this is a bug or should we update the wiki to no longer
mention _?
On Mon, Sep 13, 2010 at 02:47:58PM -0400, Ensiferous wrote:
If a request on the IP or on a domain without a matching server_block
comes in then Nginx will either choose the server block with
default_server flag in listen or the first one defined.
Question is, is this is a bug or should we update the wiki to no longer
mention _?
In catch-all server examples you may see the strange name “_â€:
server {
listen 80 default_server;
server_name _;
return 444;
}
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. You may
also use something like “–â€, “!@#â€, and so on.
and nginx users should not use hack “server_name _;” in 0.8.48+ (?)
probably this documentation fragment is slightly out-of-date ?
It probably requires some rewording, but I think if a reader reads from
the start of “Miscellaneous names” section, he should understands “_”
usage.
An empty name may be a good server name, which should not handled by
default server.
–
Igor S.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.