LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-21-2001, 05:19 AM   #1
charlie67
LQ Newbie
 
Registered: May 2001
Posts: 6

Rep: Reputation: 0
Thumbs down


Help!!!!
I installed apache 1.3.19 on Linux Madrake 8.0.
When I launch /usr/local/apache/bin/apachectl start apache starts and I have no error logs, but when I dial //http:localhost I do not have the welcome page displayed but only an error message saying "unable to locate localhost".
I suppose something is wrong in the configuration on my LAN. ???

I have connection with internet, but my PC is the only one and no one else is connected to it.

What do I have forgotten ????


Thank you for helping me.
 
Old 05-21-2001, 05:31 AM   #2
Q25
Member
 
Registered: May 2001
Distribution: RedHat 9.1
Posts: 131

Rep: Reputation: 16
it's http://localhost and not //http:localhost.. or was that just an error in your post?
 
Old 05-21-2001, 07:20 AM   #3
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Charlie,

If what Q5 suggested still doesn't work then do the following.

start the httpd running

/usr/local/apache/bin/apachectl start

Then make sure you can ping localhost
# ping 127.0.0.1
if nothing happens then your /etc/hosts file is missing the localhost bit. "if this is the case other things won't work"

Then type
# netstat -nap | grep ":80"
Should see something listening at port 80.
if not it hasn't started or your httpd is running on a different port.
find out which one with:
#netstat -nap | grep "httpd"

then in your browsers use the IP address of the actual system. i.e http://127.0.0.1

/Raz
 
Old 05-22-2001, 09:21 AM   #4
charlie67
LQ Newbie
 
Registered: May 2001
Posts: 6

Original Poster
Rep: Reputation: 0
error !!!

Quote:
Originally posted by Q25
it's http://localhost and not //http:localhost.. or was that just an error in your post?


Yes, it's just an error in my post.
I typed http://localhost

Thank You for answering
 
Old 05-22-2001, 02:05 PM   #5
charlie67
LQ Newbie
 
Registered: May 2001
Posts: 6

Original Poster
Rep: Reputation: 0
answer to razbot

Quote:
Originally posted by razbot
Charlie,



If what Q5 suggested still doesn't work then do the following.



start the httpd running



/usr/local/apache/bin/apachectl start



Then make sure you can ping localhost

# ping 127.0.0.1

if nothing happens then your /etc/hosts file is missing the localhost bit. "if this is the case other things won't work"



Then type

# netstat -nap | grep ":80"

Should see something listening at port 80.

if not it hasn't started or your httpd is running on a different port.

find out which one with:

#netstat -nap | grep "httpd"



then in your browsers use the IP address of the actual system. i.e http://127.0.0.1



/Raz

Hello, razbot
thank you a lot for your help, but I have not solved the problem.
when I ping localhost I get this message:
"connect: network is unreachable"
I have the file /etc/hosts and it contains the line:
127.0.0.1 localhost

when I type "netstat -nap |grep ":80" " I have this reply:

tcp 0 0 0.0.0.0.0:80 0.0.0.0:* LISTEN 932/httpd


Can someone help me ??????


Tanks a lot

 
Old 05-23-2001, 03:17 AM   #6
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Hello,

Ok if you can't ping the 127.0.0.1 address on that same Linux box then it looks like your default router for the "lo" interface is incorrect or not set.

or you have a tcp wrapper filtering it out. "i.e firewall incorrectly filtering out localhost from internal interface"

Type #netstat -r | grep "127"
What does it show, if nothing then the route to the localhost is not set.

What happens when you try to connect to the website from the same system but using its IP address?

eg. http://10.30.28.23

/Raz
 
Old 05-27-2001, 11:17 AM   #7
charlie67
LQ Newbie
 
Registered: May 2001
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy I am in a big mess !!!

Quote:
Originally posted by razbot




Hello,











Ok if you can't ping the 127.0.0.1 address on that same Linux box then it looks like your default router for the "lo" interface is incorrect or not set.











or you have a tcp wrapper filtering it out. "i.e firewall incorrectly filtering out localhost from internal interface"











Type #netstat -r | grep "127"





What does it show, if nothing then the route to the localhost is not set.











What happens when you try to connect to the website from the same system but using its IP address?











eg. http://10.30.28.23











/Raz


















Hi there,




thanks a lot for your interest.




when I type netstat -r |grep "127" I have nothing showed.




when I connect to the website from the same system but typing the IP address (http://127.0.0.1) I have the same problem as connecting to (http://localhost). - "impossible to connect to localhost or 127.0.0.1".









My network should be configured in loopback mode but nothing works.







I configured it as follows:



PRIMARY NAME+DOMAIN: snoopy.charlie.it



IP ADDRESS: 127.0.0.1



NETMASK: 255.0.0.0











What else can I check ?



Thank you in advance



 
Old 05-30-2001, 05:32 AM   #8
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Cool

Ok lets work this out.

Mail me the outputs from these commands.

I'm only interested in the "lo" interface and the 127.0.0.0 route that's set, but it will also show all the info on the internet IP address stuff.

#netstat -rn
#cat /etc/hosts
#ifconfig -a


My snail mail : roldbury@newmail.net

Cheers,
Raz
 
Old 05-31-2001, 09:13 AM   #9
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Right from looking at what you showed me, it looks like your default route to your localhost is not set + your localhosts ip in the ifconfig table.


your "ifconfig -a" should look like this:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:3348 errors:0 dropped:0 overruns:0 frame:0
TX packets:3348 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0


Check to see if your scripts are ok for local interface.

# cat /etc/sysconfig/network-scripts/ifcfg-lo

should say
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

if it's not there you have a major problem.!
recreate the file with the above text in it, in the directory /etc/sysconfig/network-scripts/
like below.
-rwxr-xr-x 1 root root 254 Sep 20 1999 ifcfg-lo

now run the script:
/etc/sysconfig/network-scripts/ifup ifcfg-lo

local interface should start now.
do a ifconfig -a to check it says UP LOOPBACK RUNNING.

Now add the route to the routing table:
# route add -net 127.0.0.0 netmask 255.0.0.0 dev lo

should see in # route -rn
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


That's it, don't know why the /etc/rc.d/init.d/network script failed to start these interfaces.

Now ping 127.0.0.1 does it work ?
/Raz
 
Old 06-11-2001, 05:29 AM   #10
charlie67
LQ Newbie
 
Registered: May 2001
Posts: 6

Original Poster
Rep: Reputation: 0
It worked

Quote:
Originally posted by razbot
Right from looking at what you showed me, it looks like your default route to your localhost is not set + your localhosts ip in the ifconfig table.


your "ifconfig -a" should look like this:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:3348 errors:0 dropped:0 overruns:0 frame:0
TX packets:3348 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0


Check to see if your scripts are ok for local interface.

# cat /etc/sysconfig/network-scripts/ifcfg-lo

should say
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

if it's not there you have a major problem.!
recreate the file with the above text in it, in the directory /etc/sysconfig/network-scripts/
like below.
-rwxr-xr-x 1 root root 254 Sep 20 1999 ifcfg-lo

now run the script:
/etc/sysconfig/network-scripts/ifup ifcfg-lo

local interface should start now.
do a ifconfig -a to check it says UP LOOPBACK RUNNING.

Now add the route to the routing table:
# route add -net 127.0.0.0 netmask 255.0.0.0 dev lo

should see in # route -rn
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


That's it, don't know why the /etc/rc.d/init.d/network script failed to start these interfaces.

Now ping 127.0.0.1 does it work ?
/Raz


Hi,Sorry for the delay, but as usual I was a bit busy.

you got it right.
It was the local interface "lo" that was not started.
After following your instructions everything started to work.


Ciao and thanks again
 
  


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
Difficulty gettin YUM to work... guest Linux - General 1 03-14-2005 08:23 PM
need a little help gettin X windows to work sdlinux Slackware 15 09-17-2004 11:22 PM
Gettin GAIM to work... lokizen Linux - Newbie 3 09-04-2004 11:50 AM
Gettin my sound to work ahprophet Linux - Hardware 2 05-03-2004 06:34 PM
Help Gettin Oracle Database Lite 9 to work on red hat 7.3 cartridge Linux - Software 3 12-16-2003 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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