LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   connection to localhost refused (https://www.linuxquestions.org/questions/linux-networking-3/connection-to-localhost-refused-177367/)

digitalgravy 05-03-2004 11:05 AM

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 http://127.0.0.1/ 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!

paijm021 05-03-2004 11:39 AM

Hi,

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.

Bye,

Joris.

michaelk 05-03-2004 11:49 AM

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?

digitalgravy 05-03-2004 01:19 PM

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 127.0.0.1 it doesnt work. Wierd. Any other ideas.

nerdstat 05-03-2004 04:22 PM

Wild guess:
is the entry
127.0.0.1 localhost
in your /etc/hosts file?
Otherwise: maybe something in the Apache config?

digitalgravy 05-03-2004 04:27 PM

Yes, 127.0.0.1 localhost is in /etc/hosts

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

Thanks


All times are GMT -5. The time now is 06:00 AM.