- If you haven’t done so already, go Apple Menu > System Preferences > Sharing
- Ensure that “Web Sharing” is checked
Tip: To restart Apache in the future, you can come to the same control panel, uncheck and recheck the Web Sharing item.
Tip: Alternatively, you can type the following into a terminal:
sudo /usr/sbin/apachectl graceful
Tip: Alternatively, you can create an Automator script as follows:
- Open a new, blank, custom workflow
- Add a “Run AppleScript” action.
- Type the following, replacing values as necessary:
do shell script “sudo /usr/sbin/apachectl graceful” password “[YOUR ROOT PASSWORD]” with administrator privileges
- Save the workflow as an Action.