LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-26-2004, 09:43 AM   #1
arimus25
Member
 
Registered: Feb 2004
Location: Toledo, OH
Distribution: Mandrake 10.0
Posts: 50

Rep: Reputation: 15
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.
 
Old 02-26-2004, 10:29 AM   #2
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 02-26-2004, 12:04 PM   #3
brahma501
LQ Newbie
 
Registered: Feb 2004
Posts: 8

Rep: Reputation: 0
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
 
Old 02-26-2004, 12:26 PM   #4
arimus25
Member
 
Registered: Feb 2004
Location: Toledo, OH
Distribution: Mandrake 10.0
Posts: 50

Original Poster
Rep: Reputation: 15
Looks like the problem is my loopback file is missing, I accedently deleted it I know where it is supposed to go, but what is the file called and what is in it?
 
Old 02-26-2004, 01:12 PM   #5
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 02-26-2004, 01:18 PM   #6
arimus25
Member
 
Registered: Feb 2004
Location: Toledo, OH
Distribution: Mandrake 10.0
Posts: 50

Original Poster
Rep: Reputation: 15
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.
 
Old 02-26-2004, 01:39 PM   #7
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 02-26-2004, 02:01 PM   #8
arimus25
Member
 
Registered: Feb 2004
Location: Toledo, OH
Distribution: Mandrake 10.0
Posts: 50

Original Poster
Rep: Reputation: 15
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.
 
Old 02-26-2004, 02:55 PM   #9
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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"
 
Old 02-26-2004, 05:12 PM   #10
arimus25
Member
 
Registered: Feb 2004
Location: Toledo, OH
Distribution: Mandrake 10.0
Posts: 50

Original Poster
Rep: Reputation: 15
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!

Last edited by arimus25; 02-26-2004 at 05:19 PM.
 
  


Reply



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
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:22 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