Skip to content

Instantly share code, notes, and snippets.

@hanhpv
Created April 11, 2017 15:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save hanhpv/8f1ec24231aff7019b20e2a9d64ef5fe to your computer and use it in GitHub Desktop.
Save hanhpv/8f1ec24231aff7019b20e2a9d64ef5fe to your computer and use it in GitHub Desktop.
Remove default Mac OS apache2

To stop the built-in Apache server in Mac OS X, use this command:

sudo apachectl -k stop

Then just enter your administrator password. And to prevent Apache from coming up again on if your system reboots/restarts just run this launchctl unload command; you’ll need your administrator password again:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

When that’s all done, check the output of sudo lsof -i:80 and the built-in Apache web server in Mac OS X should be completely stopped and disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment