could not bind to address 0.0.0.0:80

Asked by ankit

When ever i am starting my apache i am getting this error
root@neel-laptop:~# sudo /etc/init.d/apache2 restart
 * Restarting web server apache2 [Mon Apr 05 14:29:17 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Apr 05 14:29:17 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

how to help it out

Question information

Language:
Arabic Edit question
Status:
Answered
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Koen (koen-beek) said :
#1

maybe a web server is already running on port 80 ?

what happens if you change the 80 in /etc/httpd/conf/httpd.conf to lets say 88 ?

or check whether port 80 is already being listened to with this command in a terminal:

lsof -i4

Revision history for this message
ankit (ankitguptajpr) said :
#2

when i use this
/etc/httpd/conf/httpd.conf

 it says no such file or directory exists
and using
lsof -i4
 i get output
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
pidgin 3942 ankit 20r IPv4 12198 TCP 117.96.92.251:47500->mg-in-f125.google.com:xmpp-client (ESTABLISHED)
pidgin 3942 ankit 21w IPv4 12200 TCP 117.96.92.251:47501->mg-in-f125.google.com:xmpp-client (ESTABLISHED)
firefox 4105 ankit 65u IPv4 21149 TCP 117.96.92.251:48734->hb-in-f18.google.com:www (ESTABLISHED)
firefox 4105 ankit 68u IPv4 20415 TCP 117.96.92.251:36792->125.252.226.17:www (ESTABLISHED)
firefox 4105 ankit 76u IPv4 20453 TCP 117.96.92.251:50541->hb-in-f19.google.com:www (ESTABLISHED)
firefox 4105 ankit 79u IPv4 20496 TCP 117.96.92.251:39760->webchat.mibbit.com:www (ESTABLISHED)
seamonkey 5237 ankit 46u IPv4 21025 TCP 117.96.92.251:47082->hb-in-f83.google.com:www (ESTABLISHED)
seamonkey 5237 ankit 57u IPv4 20367 TCP 117.96.92.251:49318->hb-in-f17.google.com:www (ESTABLISHED)

what should i do i want to start my apache

Revision history for this message
Koen (koen-beek) said :
#3

try

sudo /etc/init.d/apache2 start

or

sudo /etc/init.d/apache2 restart

try to see what is listening to what port (www port):

sudo netstat --tcp --udp --listening --program

Revision history for this message
meto (aljgd) said :
#4

root@neel-laptop:~# sudo /etc/init.d/apache2 restart
 * Restarting web server apache2 [Mon Apr 05 14:36:34 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Apr 05 14:36:34 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

help me

Can you help with this problem?

Provide an answer of your own, or ask ankit for more information if necessary.

To post a message you must log in.