title: nginx server different files from localhost and 127.0.0.1
body: <p>I set up a nginx docker image and my nginx.conf is like this:</p>
  <pre><code>server {
       listen 80 default_server;
       root /app/public;
  
       index index.php index.html index.htm;
      
     }
  </code></pre>
  <p>When I connect to 127.0.0.1, it serve me the correct index.html file but it serve the default nginx welcome page when I connect to localhost.</p>
  <p>Is this a nginx issue or networking host resolve issue? How do I fix it so that it will serve me the correct index.html file from both localhost and 127.0.0.1?</p>
  <p>Thanks,</p>