What is the difference between localhost and remote host




















Learn more. What is different between localhost Asked 3 years, 6 months ago. Active 3 years, 6 months ago. Viewed times. Improve this question. If you set the host variable to 'localhost', you need to access the website at localhost When providing a hostname, the server listens for requests directed at that hostname — rickjerrity.

I had less understand about it. Add a comment. Active Oldest Votes. I want difference between four form of server indicator in url address: localhost Improve this question. Sam Sam 4 4 gold badges 12 12 silver badges 22 22 bronze badges.

Add a comment. Active Oldest Votes. It is all about address resolution. Improve this answer. If that is the case: Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Doubt has raised from my another question Where if i give localhost to my path, it works.

But it doesn't work if i give my system ip. Do i need to map my ip to localhost? Doesn't change? An example would be a MySQL database - you want your PHP application running on the same server to connect to it, but don't want any external services or even hackers from the outside to connect. By configuring MySQL to only accept localhost addresses This device is present on all systems, regardless of whether they have a physical network device fitted WiFi or Ethernet, for example.

A system that is not connected to any network will have this loopback device and hence a Your real IP address This is usually a physical network device WiFi or Ethernet although advanced setups using tun or tap devices can use them too. Again, the name resolution for example www.

The ip that you get from the router is a different story: it's the address that allows other computer on the network to find you. Well, you can use that ip on the same machine too, but it works differently as before: it's going out to the router and in again I'm simplifying here, but that's the general idea. And if you are connected to the internet, you also get another ip from your ISP - the ip by which other computer all over the world find you.

However, these two at least refer to the same network adapter eth0 or the wireless card or whatever. The operating system, the servers and so on You usually don't have a firewall for that, and many local services have a localhost interface that is meant simply to communicate with an application. Many times, you will want to test your web server by first hooking it up to listen on localhost only, so you can check if it works, but other people can't. Then, you can reconfigure to listen on your external ip address and start serving the website and test again if everything still works.

When you access the local IP adress, your computer will ask the router to fetch the data, and your router will then point back to your computer. Sign up to join this community. The best answers are voted up and rise to the top.



0コメント

  • 1000 / 1000