LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   could not bind to address 0.0.0.0:80, driving me crazy! (http://www.linuxquestions.org/questions/linux-server-73/could-not-bind-to-address-0-0-0-0-80-driving-me-crazy-821447/)

jbcolmena 07-22-2010 05:47 AM

could not bind to address 0.0.0.0:80, driving me crazy!
 
Hi all.

I'm using xubuntu 9.10. NOT ubuntu server. I need to install a lamp server on my box. I cannot install a new OS like ubuntu server, have to use what I got.

when I run apache2, I get:
Quote:

(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
I've changed the port that php listens too to 8080, 81, and I get the same message but with the new port number.

I've removed and installed apache three times, read all kind of threats on the web, but cannot find the solution! it's just driving crazy. Any ideas?

jbcolmena 07-22-2010 06:06 AM

I changed the ports editing the /etc/apache2/ports.conf file, which is:
Quote:

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>
netstat -A inet -lnp gives:
Quote:

Protocolo Recv-Q Send-Q Dirección Local Dirección Externa Estado PID/Program name
tcp 0 0 0.0.0.0:445 0.0.0.0:* ESCUCHAR -
tcp 0 0 0.0.0.0:1024 0.0.0.0:* ESCUCHAR -
tcp 0 0 0.0.0.0:135 0.0.0.0:* ESCUCHAR -
tcp 0 0 0.0.0.0:139 0.0.0.0:* ESCUCHAR -
tcp 0 0 0.0.0.0:80 0.0.0.0:* ESCUCHAR -
tcp 0 0 0.0.0.0:22 0.0.0.0:* ESCUCHAR -
tcp 0 0 127.0.0.1:631 0.0.0.0:* ESCUCHAR -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:35670 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
which yes, shows something listening to port 80, but what? BTW, "escuchar" is listening is spanish. Live in italy, box in spanish, in an english forum... confusing.

sem007 07-22-2010 06:22 AM

Hi jbcolmena,

kindly paste output of below command

dpkg --list apache*

netstat -antlp | grep 80

jbcolmena 07-22-2010 06:42 AM

Of course port 80 was busy... because apache was listening to it! apache has been working all the time...

read something the wrong way, don't know, but made a newbie mistake and wasted like 6 hours on a problem that didn't even exists.

Sorry to waste your time.


All times are GMT -5. The time now is 04:09 PM.