Search code examples
apachemacos-sierra

AH00072: make_sock: could not bind to address [::]:80 (13)Permission denied


After upgrading to macOS Sierra my apache doesn't start.

Where it goes the apache error_log:

AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist

AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist

AH00557: httpd: apr_sockaddr_info_get() failed for username.local

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message (13)Permission denied:

AH00072: make_sock: could not bind to address [::]:80 (13)Permission denied: 

AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down*

I already follow these instructions without success: http://digitalshore.io/local-web-development-environment-apache-macos-sierra-10-12/


Solution

  • For first 2 comment dummy host setting in

    httpd-vhosts.conf

    For 3,4 uncomment ServerName and assign value in

    httpd.conf

    ex: ServerName local_server:80

    And add the same value in /etc/hosts to access by server name.

    5,6 because port 80 is used by other application

    sudo lsof -i:80