title: Could not reliably determine the server's fully qualified domain name for MacBook
body: <p>First time got a new MBP 2016. Trying to setup PHP,MySQL &amp; Apache. Started Apache by using command</p>
  
  <pre><code>sudo apachectl restart
  </code></pre>
  
  <p>Then installed PHP by </p>
  
  <pre><code>brew install php71 --with-httpd24
  </code></pre>
  
  <p>Also did following changes...</p>
  
  <pre><code>#
  # DirectoryIndex: sets the file that Apache will serve if a directory
  # is requested.
  #
  
  DirectoryIndex index.html index.php
  SetHandler application/x-httpd-php
  
  ServerName dev-server
  </code></pre>
  
  <p>Also, updated the same in host file <code>/etc/hosts/</code></p>
  
  <p>But, whenever I'm trying to Stop/Restart my apache by using command <code>sudo apachectl restart</code> or <code>sudo apachectl stop</code> I'm getting following errors.</p>
  
  <pre><code>AH00557: httpd: apr_sockaddr_info_get() failed for Sureshs-MacBook-Pro.local
  AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
  httpd not running, trying to start
  </code></pre>
  
  <p>But, strangely when I'm executing any PHP file from my browser <code>http://localhost/index.php</code> it's working fine. As in my index.php file I'm using code <code>&lt;?php phpinfo(); ?&gt;</code> It's showing PHP version <code>PHP Version 7.1.4</code> loaded.</p>
  
  <p>Tried a lot but no clude what's going wrong at where.</p>
  
  <p><strong>---UPDATE---</strong></p>
  
  <p>After updating <code>127.0.0.1 Sureshs-MacBook-Pro.local</code> in my <code>/private/etc/hosts</code> file, one error solved. Now I'm getting only one below error.</p>
  
  <pre><code>AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Sureshs-MacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
  </code></pre>