dyoung
Posts: 2
Joined: Wed Nov 07, 2012 10:16 pm

Local Network Connection Problems

Wed Nov 07, 2012 10:24 pm

Hi-
I just got my 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!

dyoung
Posts: 2
Joined: Wed Nov 07, 2012 10:16 pm

Re: Local Network Connection Problems

Wed Nov 07, 2012 11:47 pm

Strangely enough, after posting this I thought I'd double check the fundamentals. I booted up the system, ran 'ifconfig', and found a different ip address listed! 192.168.3.127 instead of 127.0.0.3!

I'm not sure if I missed it, or the reboot helped me complete or undo some of my tinkering, but a fella can't argue with results! Upon pointing to the new ip address, things worked as expected.

Thanks!

Wendo
Posts: 142
Joined: Sun Jun 10, 2012 8:27 pm

Re: Local Network Connection Problems

Thu Nov 08, 2012 6:27 am

127.0.0.1 is whats known as the localhost address.

Every single computer with a network stack has that address, so no matter what computer you type it on, you're talking to that computer.

As you've discovered, to access something across a network you need an IP address tied to a network interface other than localhost

Return to “Networking and servers”