LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-23-2004, 11:21 AM   #1
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Rep: Reputation: 15
apache2 unable to bind to 0.0.0.0:80


i've set my httpd.conf.. listen 0.0.0.0:80.. although just having 80 there works the same it seems.. anyway.. i then type ]# apachectl start and it comes up with this..

(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 also can't get to my webpage locally using http://localhost/index.htm.. although i use to be able to.. and i didn't think i changed anything..

wha' happen?
 
Old 01-23-2004, 11:33 AM   #2
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Hi Zaius!

Are you by any chance trying to run apache from a user that's not root? Only root can bind to ports < 1024.

Martin
 
Old 01-23-2004, 11:34 AM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Try 127.0.0.1 instead.
 
Old 01-23-2004, 12:00 PM   #4
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
i am root when i do this.. i do it from the terminal and then switch to root with su. i also tried port 8080.. no luck.. same with changing it to 127.0.0.1

athough apachectl start doesn't come up with that error when i try a different port..

i just checked my firewall stuff.. and i have nothing in there about dropping port 80.. so i don't think that's causing the problem..
 
Old 01-23-2004, 12:02 PM   #5
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
post your hosts file (/etc/hosts)
 
Old 01-23-2004, 12:05 PM   #6
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
wooh!.. i just tried accessing my site http://jimmyb.homeip.net from my computer that is connected to this linux system and it came up with the Fedora Core Test page... usually it just says that this domain name isn't registered.. hmm.. i think i'm getting somewhere .. all i have to do now is get it apache running.. joy
 
Old 01-23-2004, 12:06 PM   #7
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
[root@Linux etc]# ./hosts
bash: ./hosts: Permission denied
 
Old 01-23-2004, 12:09 PM   #8
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
# 'su'
# [root password]
# 'cat /etc/hosts'
 
Old 01-23-2004, 12:11 PM   #9
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
oh.. this all makes sence now.. it's running off of the apache install from fedora.. and not he one installed.. i recently updated apache2 with the autoupdate thingy...

how do i stop the fedora copy? as i've already setup the other one.. although it would be a simple copy over of my httpd.conf file into /etc/httpd/conf
 
Old 01-23-2004, 12:13 PM   #10
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
[root@Linux etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 Linux.Fedora localhost
 
Old 01-23-2004, 12:20 PM   #11
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
that seems ok.

OH, just get rid of that IP before :80 in httpd.conf

try 'Listen 80'

Edit: i THINK.... i am checking into it now. will post if find more.
Yeah, i was right, do 'listen 80' and play around with virtual hosts. i would not reccomend you binding it to 0.0.0.0 address thought, for quite a few reasons, one of which is: the system has no idea what 0.0.0.0 is.

Last edited by Mikhail_16; 01-23-2004 at 12:24 PM.
 
Old 01-23-2004, 12:25 PM   #12
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
muhhaahahaha!!!.. ok.. she's going.. but i had to stop the fedora copy of apache going first.. hence why when i tried starting up my installed version of apache it told me that the address was already in use..

the only thing i have to tweak (aside from what i just said above) is that it doesn't find the index.htm page.. it just goes to the directory of my webpage..

check it http://jimmyb.homeip.net/index.htm
 
Old 01-23-2004, 12:29 PM   #13
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
booya. fixed the index.htm bit.. so now http://jimmyb.homeip.net works great
 
Old 01-23-2004, 03:12 PM   #14
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
so all i need to do now is have the apache i installed load up on startup and not the apache that comes with fedora.

although i could reconfigure the fedora apache and then just delete the installed apache.. which is easier?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"unable to bind socket - Address already in use" engineerwell Linux - General 7 05-12-2010 02:46 AM
BIND - Locally OK, LAN cleints unable to resolve? Xaque208 Linux - Networking 2 08-08-2005 09:32 AM
Apache2 .htaccess - Unable To Get Password Prompt. magestic Linux - Software 2 10-27-2004 08:49 AM
Why is my socket unable to bind to the port in the C Code. mcp_achindra Programming 10 03-24-2004 08:34 AM
Unable to bind a port svelango Linux - Networking 0 02-15-2002 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration