Just updated to Monterey and getting localhost to connect gives this error:
This site can’t be reached localhost refused to connect
Following excellent guides with brew I have installed httpd And running this command in MacOS Terminal
brew services restart httpd
returns
==>Successfully stopped `httpd` (label: homebrew.mxcl.httpd)
==> Successfully started `httpd` (label: homebrew.mxcl.httpd)
but then connecting to: http://localhost:8080/ gives the error above thank you
CodePudding user response:
You give no indication that you're changing httpd's ports anywhere, yet you're trying to connect to 8080 - I'd not expect anyone to answer there. Port 80 (the default for http), e.g. http://localhost/
would be a more sensible address to expect an answer on.
CodePudding user response:
I add this in case it helps someone... The real issue was that all of the move from Apple provided Apache to Apache installed by brew was not complete and so page only showed if Moneterey Apache was running Simple solution was to complete configuration of httpd file and restart Mac ~ then all fell in to line: To test the location of Apache/httpd from Terminal run:
which httpd
Homebrew location is:
/usr/local/bin/httpd
If you are getting the default macOS location of
/usr/sbin/httpd
Restart the computer and try the location test again. My thanks to WP Beaches for this