PSA
PSA

Reputation: 225

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/

Upvotes: 6

Views: 32832

Answers (4)

kenorb
kenorb

Reputation: 166843

AH00558: httpd: Could not reliably determine the server's fully qualified domain name.

You need to identify httpd.conf Apache configuration file by:

apachectl -t -D DUMP_INCLUDES

then edit it and uncomment the line with ServerName (make sure it has the valid server name). E.g.

ServerName localhost

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

You need to launch Apache service as root user, otherwise the process doesn't have permission to bind to port 80 since all ports below 1024 needs administrative permissions.

So you need run it as:

sudo apachectl start

Upvotes: 1

Simon B
Simon B

Reputation: 61

In my case, the problem was resolved by adding:

127.0.0.1       MacBook-Air-de-xxxxxx.local

in /etc/hosts file.

The find the exact name of the computer, check in the settings of sharing:

enter image description here

Upvotes: 0

George
George

Reputation: 3629

Errors involving apr_sockaddr_info_get() may be resolved by assigning a meaningful value (such as localhost) for ServerName in /etc/apache2/httpd.conf.

Open /etc/apache2/httpd.conf using sudo.

Reference: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions

Upvotes: 1

Naga Penmetsa
Naga Penmetsa

Reputation: 384

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

Upvotes: 13

Related Questions