LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache Help (https://www.linuxquestions.org/questions/linux-software-2/apache-help-150739/)

arimus25 02-26-2004 09:43 AM

Apache Help
 
I installed Apache2 and when I try to go to http://localhost, this is what I get:

An error occured while loading http://localhost:


Timeout on server
Connection was to localhost at port 80

It worked at one time, but I must have did something so it doesnt work. Is there a way I can reset everything in Apache2 or can I reinstall it?

Thanks for any help.

benjithegreat98 02-26-2004 10:29 AM

Have you done anything with your firewall lately? It is possible to block your loopback address (localhost, 127.0.0.1) with a firewall.

If you re-install it, then you should rename your config file so it will get re-written. If you download and extract apache from the site, it may have a default config file in the source that you can copy over.

brahma501 02-26-2004 12:04 PM

Few things to try ...

Any log errors?
Check your http.conf for Port.
Try telnet localhost 80 to see if it can connect.
Also check your inet/xinetd configs.

brahma

arimus25 02-26-2004 12:26 PM

Looks like the problem is my loopback file is missing, I accedently deleted it :cry: I know where it is supposed to go, but what is the file called and what is in it?

benjithegreat98 02-26-2004 01:12 PM

are you talking about /etc/hosts ? There should be a line in there that says
127.0.0.1 localhost

You can tell if loopback is working by typing http://127.0.0.1 into your browser. It is the same as http://localhost , except that the IP is already resolved.

arimus25 02-26-2004 01:18 PM

No, I am not talking about /etc/host (I cant even find that, I am using RH 9 if that makes a diff). I am talking about /etc/sysconfig/network-scripts, there used to be a Lo somthing there (I dont remember exactly what it was), but I read somewhere that it was for loop back functions.

benjithegreat98 02-26-2004 01:39 PM

Go to the command line and type
Code:

ping 127.0.0.1
. If you get a reply then loopback is working just fine. Type ping localhost as well to see if that is returning anything.

arimus25 02-26-2004 02:01 PM

Here is what I get:

[root@localhost root]# ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
From 500.Serial3-6.GW1.DET5.alter.net (65.195.243.209) icmp_seq=3 Destination Host Unreachable

And:

[root@localhost root]# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
From 65.195.243.209 icmp_seq=4 Destination Host Unreachable

This shows it is not working.

benjithegreat98 02-26-2004 02:55 PM

I'm running FC1 (so it should be the same or close to RH9's) and here is what I have for the file you said is gone....

Code:

[benji@benfedora network-scripts]$ cat ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

after you put that in you can reboot or run "/etc/init.d/network restart"

arimus25 02-26-2004 05:12 PM

Thanks benjithegreat98! That is exactly what I needed. Now I can ping localhost and 127.0.0.1, but when I try to go to http://localhost or http://127.0.0.1, Mozilla says "The connection was refused when attempting to contact localhost" So I am still having troubles with that.

*EDIT* I got it to work now, forgot to start apache again. I need to have it start on boot up. Thanks for all of the help!


All times are GMT -5. The time now is 08:36 AM.