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. |
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. |
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 |
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?
|
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. |
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.
|
Go to the command line and type
Code:
ping 127.0.0.1 |
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. |
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 |
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. |