Q:

Nginx server host header server_name

In this tutorial it is written that after matching against the listen directive, nginx will match agains the server_name directive, which can be either an ip adress or a domain name.
But how will it ever be called when you use a domain name? When I go to my browser and write http://myserver/, this will go the DNS server of my ISP and will tell me that there is no http://myserver/ anywhere to be found.
How does it work? 

A:

When you type http://myserver/ in your browser, you will ask the DNS server to resolve name myserver to IP address. Then, the browser will connect to one of the returned IP address(es).
The name myserver will be passed along with HTTP request as Host: myserver header. This is how things work generally not specific to nginx.

