sakhunzai
sakhunzai

Reputation: 14470

Unable to stop apache on Mac OSx Yosemite 10.10

I have installed php56 with apache2.4 using homebrew. Everything is find except I am unable to stop apache or restart it completely.

This should stop apache: sudo apachectl -k stop

But when I grep the process list I see: ps ax|grep httpd

7269 ?? Ss 0:00.17 /usr/sbin/httpd -D FOREGROUND 7270 ?? S 0:00.02 /usr/sbin/httpd -D FOREGROUND 7273 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND

Even killing does not stops it: sudo killall httpd which kills httpd but after a while it restarts: ps ax|grep httpd

7684 ?? Rs 0:00.13 /usr/sbin/httpd -D FOREGROUND 7686 s003 S+ 0:00.00 grep httpd

After a while: ps ax|grep httpd

7684 ?? Ss 0:00.15 /usr/sbin/httpd -D FOREGROUND 7687 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND 7690 s003 S+ 0:00.00 grep httpd

In an ideal scenario :

start : brew services start apache2

stop : brew services stop apache2

The question is why httpd service is autostarted and is there is a fix for this bug ?

Upvotes: 0

Views: 1270

Answers (1)

MindTooth
MindTooth

Reputation: 5130

I suspect that there is either a LaunchDaemon or LaunchAgent that has been set to KeepAlive.

Also, did you use sudo brew services when you loaded apache? If so, regular brew services interact with just the user agents, not the system.

Upvotes: 1

Related Questions