Stop Apache server on Mac High Sierra
Asked Answered
B

6

12

I'm trying to stop apache server on my macbook. I've tried the following

$ sudo apachectl stop

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

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

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

What am i doing wrong?

Beniamino answered 18/4, 2018 at 22:13 Comment(0)
C
10

try sudo killall httpd && sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist it's worked on my machine

Cernuous answered 26/11, 2019 at 8:31 Comment(1)
This works for me. πŸ‘ πŸ€” I want to know if these commands also prevent the service for starting upon boot? Thanks – Retroflexion
I
8
sudo killall httpd 

This should work.

Ieshaieso answered 19/6, 2018 at 18:25 Comment(1)
Inmediatly after that command, if I put: sudo lsof -i :80 I still see the commands running but with another PIDs – Gynaecology
S
4

sudo apachectl start

then

sudo apachectl stop

is what worked for me

Salutation answered 30/4, 2021 at 17:4 Comment(3)
If you drop the t then it might for you: apacthectl β†’ apachectl – Morell
if it still not working, do sudo apachectl stop again then restart your computer – Pareu
or do sudo apachectl stop then run sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null – Pareu
B
3

see https://superuser.com/a/1110751/925311:

sudo launchctl unload -w /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/com.apple.serviceproxy.plist
Buss answered 18/7, 2018 at 19:19 Comment(1)
To add some context for future search indexing: This resolved the issue for me on macOS Mojave after OS X Server was nerfed but somehow refusing to quit despite all the other things I tried. – Braunite
S
0

Try these commands:

sudo apachectl stop 
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null 
Shields answered 30/6, 2023 at 10:53 Comment(0)
K
-1

sudo launchctl remove apachectl

Klimesh answered 16/10, 2018 at 13:34 Comment(0)

© 2022 - 2024 β€” McMap. All rights reserved.