macOS apache installs on different directory with homebrew, how to start/stop?
Solution 1:
TL:DR; Use /usr/sbin/apachectl
The issue is that you have bins for both versions, and as they have the same name. Your .bashrc
/ .bash_profile
configuration will determine the order bin folder are included, which determines which wins.
It's generally a good idea to /usr/local/bin
win, as this is stuff you installed yourself and not something that comes with the OS by default.
The location of the apachectl
script for the apache installed on macOS is located in /usr/sbin
, so you can run it directly using /usr/sbin/apachectl
. Alternately you can make an alias or symlink for this to make a unique command.