I have a problem with Apache on Mac OS Big Sur. After the OS update, the Apache (using Brew) doesn't work anymore.
So I have decided to uninstalled the httpd
Formula.
Then tested is the preinstalled version of Apache works and it does.
- So I have stopped the preinstalled Apache
sudo apachectl stop
- Unloaded launcher
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
- Updated the Homebrew
brew update
brew doctor
brew upgrade
- Installed the httpd again
brew install httpd
(installed successfully) - Started the httpd
sudo brew services start httpd
However checking the status sudo brew services list
I can see that the httpd service has status error
.
When I try to start apache using sudo apachectl start
I'm receiving the error:
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
I've checked if maybe there is something else running on the 8080 port lsof -i TCP:8080
but it's not.
I've checked which Apache is used (which apachectl
) and it seems to be the right one (/usr/local/bin/apachectl
)
No matter what port I'm trying to use, always there is an error that the address is already in use.
Does anyone has any idea how to fix this problem?