Search code examples
macosapachelocalhosthttpd.confmacos-sierra

Apache ERR_CONNECTION_REFUSED on Mac OS X Sierra 10.12


I've updated my OS X, then when I wanna reach the user/Sites directory, which function as my localhost's root directory, I get the following error message: ERR_CONNECTION_REFUSED.

Tried many httpd configuration variations from Google results, but nothing helps, apachectl configtest returns the following: httpd: Syntax error on line 537 of /private/etc/apache2/httpd.conf: Could not open configuration file /private/etc/apache2/other/+php-osx.conf: No such file or directory.

Should I create such file? If yes, what should it contain? Otherwise would it be possible to completely remover the built in Apache, then reinstall it?

Thanks in advance for the help!


Solution

  • I have finally found a useful article, which helped me to resolve the issue: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions