-1

I have installed apache2 in my debian7.8 . When to input 192.168.1.105 in firefox i get the same output as 127.0.0.1 ?

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

Why 192.168.1.105 = 127.0.0.1 in my pc?

5

From a networking point of view your Operating System sees two network interfaces. One is purely logical and created in software and doesn't even need a physical set of chips and connections to make up a network connection. The other is a physical network connection (most likely with an RJ-45 socket or a wireless adapter) and can be used to connect to other computers.

Your web server has been configured to listen on network interfaces. In your case it listens to all available interfaces, so the local interface at 127.0.0.1 and the ip address that is assigned to your physical network adapter (at the moment 192.168.1.105).

If the web server is listening on all interfaces it doesn't matter which ip address you use.

You could even type in localhost in the browser address bar as it is the alias assigned to 127.0.0.1. See /etc/hosts for that.

The local address at 127.0.0.1 will not change. It will be the same across other networked operating systems.

An excellent starting point for finding out more about the Localhost concept can be found on Wikipedia: http://en.wikipedia.org/wiki/Localhost

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.