3 Replies Latest reply: Nov 8, 2012 10:11 AM by Dave Young RSS

Local Network Connection Problems

Dave Young

Hi-

I just got my Raspberry Pi (first time using linux) and I'm starting with trying to access an html page.  I've created a file called "dogdoor.html" in my /var/www folder that just says:

"<HTML><BODY>The door is closed</BODY></HTML>"

I can see it perfectly when accessing it from http://localhost/doogdoor.html

I used ifconfig to check the IP address of 127.0.0.1, however when I try to access 127.0.0.1/dogdoor.html I get a connection error message.  I also cannot see the index page when just pointing to 127.0.0.1.

When I ping 127.0.0.1 everything comes back just fine.

 

Am I missing something here?  I've spent hours looking around on posts and trying things without any success.

 

Thanks!

  • 1. Re: Local Network Connection Problems
    Dave Young

    Well, on a whim I decided to give it one more try and check the basics.  When I ran ifconfig again, I noticed that a new IP address had shown up: 192.168.3.127!  Either I totally missed it the first time, or something changed since I first checked it.  In any case, one can't argue with results!

  • 2. Re: Local Network Connection Problems
    obcd

    127.0.0.1 and localhost are special cases.

    They are used to test network connectivity locally from the same machine.

    If your Pi uses dhcp to obtain a network adress, it's very well possible it will get another one after a reboot.

    Most routers have an option to provide an ip adress based upon the MAC adress of the adapter requesting the adress. This fixes previous problems.

  • 3. Re: Local Network Connection Problems
    Dave Young

    Thanks!  It's nice to learn of an explanation.  While one can't argue with results, it still amkes a fella wonder...