Working with PHP and Apache locally on my Mac, I found myself needing to know how to restart Apache. The method I normally use did not work because for some reason
etc/init.d does not exist or could not be found. So I found another command that worked. Simply run the following.
sudo apachectl graceful
graceful reloads the configuration files and gracefully restarts. Any current connections are allowed to complete. That’s it! You just restarted Apache. Easy huh?