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 the Author

author image
mkyong
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

avatar
10 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
9 Comment authors
vivekAndyRickyChacha Kairuabraham Recent comment authors
newest oldest most voted
vivek
Guest
vivek

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

Andy
Guest
Andy

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
Guest
Ricky

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

Chacha Kairu
Guest
Chacha Kairu

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

abraham
Guest
abraham

oh great!,thanks to you.

Ajun
Guest
Ajun

Excellent…. It’s working for me :)

trackback
Solving the “Permission denied: make_sock: could not bind to address” issue when starting Apache on Linux « The skiing cube

[…] it’s not because I’m not running this as root (as explained here, here and there) : I’ve used the sudo command […]

Prashant
Guest
Prashant

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

joaquin
Guest
joaquin

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

Robb
Guest
Robb

Bless you :)