How to configure nginx to accept all subdomain?

Rodrigo asked:

This is part of nginx.conf:

server {
   listen 80 default deferred; # for Linux
   server_name *;
   client_max_body_size 4G;

   # omitted

I want to accept without redirecting:

How to configure server block?

My answer:

The documentation shows how to do this:


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.