M BUZZ CRAZE NEWS
// news

Can't unload native macOS Mojave apache using launchctl

By Emma Martinez

I have a fresh installation of MacOS Mojave 10.14. I'm trying to shutdown and remove auto-loading scripts for apache.

$ httpd -v
Server version: Apache/2.4.34 (Unix)
Server built: Aug 17 2018 16:29:43
$ sudo apachectl stop
$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

After rebooting, I open the browser and go to localhost and still shows "It works!". What should I do to make the OS to stop launching apache on reboot? Am I missing something?

3

1 Answer

When I run the command … sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist … I receive the following error:

/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service

Trying to delete the file manually fails, too; so I believe this is protected by SIP. I was able to disable SIP, and the command still didn't work. I just deleted the plist file to keep the process from starting. That's probably NOT the preferred method.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy