Main Tutorials

Apache error – (13)Permission denied: make_sock: could not bind to address

I hit the Apache server error (13)Permission denied: make_sock in my console, while i try to start the Apache http server with the ./apache2 start script under init.d folder.


mkyong@mkyong-desktop:/etc/init.d$ ./apache2 start
 * Starting web server apache2
apache2: Could not reliably determine the server fully qualified domain name, 
using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 
no listening sockets available, shutting down
Unable to open logs

The description is indicate that i do not have enough privileged to bind the port for Apache http server. In Unix / Linux, only some privileged users are allow to bind the port between 1 to 1024. Apache http server is using port 80 as default.

Solution

To solve this problem, there are two common ways

1) sudo to root :), or contact your administrator to grant you the privileged.


 mkyong@mkyong-desktop:/etc/init.d$ sudo ./apache2 start

2) Edit the config file to change the port Apache uses to a number greater than 1024.

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
9 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
vivek
9 years ago

on online server i am getting this error example bluehost server Thank you in advance

Andy
10 years ago

1) sudo to root :), or contact your administrator to grant you the privileged.

But I want to know how to grant me the privileged.Thanks!

Ricky
10 years ago

Thanks so much! It took four days to install & compile apache. This was the missing piece. Thanks!

Chacha Kairu
10 years ago

Awesome, Almost thought my Apache had a problem. Worked like a charm

abraham
10 years ago

oh great!,thanks to you.

Ajun
11 years ago

Excellent…. It’s working for me 🙂

Prashant
11 years ago

Awesome. Just what I was looking for. It solved my problem

joaquin
11 years ago

Thank’s Thank’s Thank’s Thank’s Thank’s Thank’s Thank’s

Robb
11 years ago

Bless you 🙂