Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-03-2004, 11:05 AM   #1
Registered: Nov 2003
Posts: 86

Rep: Reputation: 15
Angry connection to localhost refused

I am just setting up my Mandrake 10 box and I am having a problem.

When I use a browser on the MDK box and I try to access the webserver via http://localhost/ or I get the following error: "The connection was refused when attempting to contact . . . "

When in a terminal I can ping localhost and it accepts the pings. I'm not sure what to do now.

Did I miss something in the configuration, the firewall looks good, the security level looks good, and I can access the content of the webserver via my Windows box, by typing in the ip address of the Linux box.

Any help would be appreciated.

Thanks in advance!

Last edited by digitalgravy; 05-03-2004 at 11:06 AM.
Old 05-03-2004, 11:39 AM   #2
LQ Newbie
Registered: Apr 2004
Location: Germany
Distribution: Slackware 9.1
Posts: 20

Rep: Reputation: 0

First check if apache is running on your Mandrake box. -->

# netstat -a

check if apache runs and behind the default port 80.
If apache runs on a different port type http://localhost:PORTNUMBER/

If apache doesn't run fix this first. --> (if apache is installed)

# apachectl start

If apache runs, and your browser gives a problem. Check if there is a firewall running, and allow conections on port 80.


Old 05-03-2004, 11:49 AM   #3
Registered: Aug 2002
Posts: 12,772

Rep: Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986
If I understand correctly you can view a web page on another PC but not on the PC where the webserver is running?

Have you tried using the MDK's IP address instead of localhost?
Old 05-03-2004, 01:19 PM   #4
Registered: Nov 2003
Posts: 86

Original Poster
Rep: Reputation: 15
paijm021: Apache is running, as I can view the content via my windows box.

michaelk: You are correct. That was a good idea, when I type in the ip address of the linux box from the browser on the linux box, it works. And the firewall lets the connections from the windows box through. Just when I try to type in localhost of it doesnt work. Wierd. Any other ideas.

Last edited by digitalgravy; 05-03-2004 at 03:02 PM.
Old 05-03-2004, 04:22 PM   #5
LQ Newbie
Registered: Apr 2004
Location: Brussels, Belgium
Distribution: Gentoo with 2.6.8-kernel
Posts: 15

Rep: Reputation: 0
Wild guess:
is the entry localhost
in your /etc/hosts file?
Otherwise: maybe something in the Apache config?
Old 05-03-2004, 04:27 PM   #6
Registered: Nov 2003
Posts: 86

Original Poster
Rep: Reputation: 15
Yes, localhost is in /etc/hosts

Ill look in the Apache configuration, and see if I can find anything wrong there.



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
Connection refused at localhost:631 frankieboy Linux - Networking 7 07-18-2012 06:47 PM
port 25 connection refused even from localhost?? Ed1952 Red Hat 2 11-15-2005 08:24 AM
telnet localhost: Connection refused? neocookie Linux - Networking 10 08-16-2005 03:15 PM
Connection to localhost refused?!? a_priebe47 Slackware 4 09-01-2004 09:05 PM
rsh localhost : connection refused StressedLemming Linux - Networking 1 11-09-2003 12:20 PM

All times are GMT -5. The time now is 02:59 AM.

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