After upgrading to macOS, Sierra Apache cannot start / stop / restart

After upgrading to macOS, Sierra Apache cannot start / stop / restart.

Errors:

AH00557: httpd: apr_sockaddr_info_get() failed for MacBook-Pro-N.local
AH00558: httpd: Could not reliably determine the server fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

I tried reinstalling apache24 using homebrew. But this did not fix my problem. I also configured httpd.conf, uncommented ServerName localhost. But it still didn’t help.

Please, help.

+4
source share
2 answers

try adding 127.0.0.1 MacBook-Pro-N.local

to your /etc/hostsfile

+1
source

Another solution is to change ServerNameto localhost.

So, first you need to find the location of the httpd.confApache configuration file :

apachectl -t -D DUMP_INCLUDES

ServerName (, /etc/hosts). .

ServerName localhost
0

Source: https://habr.com/ru/post/1670430/


All Articles