<p dir="ltr">If you're using a 1-config-per-site setup, then yes, you could. It completely depends on your setup as to where you need to place it.</p>
<p dir="ltr">You can put it in any existing file that already has a server directive in there. Just make sure none of the other server configs/files have the default_server in their listen directive.</p>
<p dir="ltr">The server name of _ just makes sure it won't conflict with any existing name as hostnames are not allowed to have underscores in them.</p>
<p dir="ltr">The default_server is special, it makes sure that any request that does not have a matching name in the rest of the config will end up there. So not just the IP that you asked for, but also any other website name that is not in the config.</p>
<p dir="ltr">The 444 status code is just to return a "no response" kinda thing. If you want you can even have a default site there, telling users there is no site at that address with a fancy text and/or logo instead.</p>
<div class="gmail_quote">On Apr 9, 2015 8:30 PM, "blason" <<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Finalx,<br>
<br>
you mean shall I create the .conf file by name default_server and add up<br>
this there? Or would you please tell me where shoudl I add the above stanza?<br>
Sorry I am being novice in nginx just would like to know more information<br>
about this.<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,257927,257930#msg-257930" target="_blank">http://forum.nginx.org/read.php?2,257927,257930#msg-257930</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>