title: Nginx respond only to localhost: but not to server_name
body: <p>While discovering nginx (using this tutor <a href="https://www.digitalocean.com/community/tutorials/nginx-ubuntu-18-04-ru" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/nginx-ubuntu-18-04-ru</a>) met a trouble on the "Step 5 – Setting Up Server Blocks (Recommended)". Here is my server block file. </p>
  
  <pre><code>server {
         listen 81;
         listen [::]:81;
  
         root /var/www/tutorial;
         index index.html;
         server_name example.ubuntu.com;
         location / {
                 try_files $uri $uri/ =404;
         }
  }
  </code></pre>
  
  <p>But nginx response only for <code>localhost:81</code> query, not to <a href="http://example.ubuntu.com" rel="nofollow noreferrer">example.ubuntu.com</a></p>