title: Nginx config is not affected on MacOS High Sierra
body: <p>I have some issue need to clear. I have install and config nginx but not successfully. Here is my file /usr/local/etc/nginx/nginx.conf</p>
  
  <pre><code>worker_processes  1;
  error_log  /usr/local/etc/nginx/logs/error.log debug;
  
  events {
      worker_connections  1024;
  }
  
  http {
      include             mime.types;
      default_type        application/octet-stream;
  
      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';
  
      access_log  /usr/local/etc/nginx/logs/access.log  main;
  
      sendfile            off;
  
      keepalive_timeout   65;
  
      index index.html index.php;
  
      include /usr/local/etc/nginx/sites-enabled/*;
  }
  </code></pre>
  
  <p>file /usr/local/etc/nginx/sites-enabled/mage</p>
  
  <pre><code>server {
      listen       80;
      server_name  mage.local;
      root       /Users/nghiepthan/Sites/html/;
  
      access_log /Users/nghiepthan/Sites/html/nginx.access.log;
      error_log /Users/nghiepthan/Sites/html/nginx.error.log;
  
      location / {
          include   /usr/local/etc/nginx/conf.d/php-fpm;
          try_files $uri $uri/ /test.php?$query_string;
      }
  }
  </code></pre>
  
  <p>I have setup dnsmasq. config of file /usr/local/etc/dsnmasq.conf</p>
  
  <pre><code>address=/.local/127.0.0.1
  listen-address=127.0.0.1
  </code></pre>
  
  <p>Next, I had defined /etc/resolver/local nameserver 127.0.0.1</p>
  
  <p>However, when I run the command curl -IL <a href="http://mage.local" rel="nofollow noreferrer">http://mage.local</a></p>
  
  <p>I got the message: * curl: (6) Could not resolve host: mage.local*</p>
  
  <p>but if I run the command</p>
  
  <pre><code>curl -IL http://localhost
  </code></pre>
  
  <p>I got success response like this</p>
  
  <pre><code>HTTP/1.1 200 OK 
  Server: nginx/1.13.12 
  Date: Tue, 29 May 2018 11:07:27 GMT 
  Content-Type: text/html; charset=UTF-8 
  Connection: keep-alive 
  X-Powered-By: PHP/7.1.18
  </code></pre>
  
  <p>when I run on my browser, I type URL = localhost, It goes to my path had defined. I did not know where I was wrong. I have try to run command sudo nginx but I got this errors: </p>
  
  <pre><code>nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
  
  nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
  
  nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
  
  nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
  
  nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
  
  nginx: [emerg] still could not bind()
  </code></pre>
  
  <p>How can I fix these issues?</p>