Web Hosting Talk







View Full Version : What is LocalHost?


coffin
09-03-2002, 12:46 PM
Hi everyone,

Can someone explain what exactly localhost refers to, what it is exactly?

Is localhost simply another name for any domain on a particular server?

Thanks.

DayGlo
09-03-2002, 12:51 PM
localhost is whatever computer you are using at the time, if you run a webserver and go to http://localhost it will take you to your server. No one else can access it by using the name as it will take them to their own computer.

coffin
09-03-2002, 12:59 PM
Thanks, DayGlo.

So, if I have five domains on one server and I've got a single script that any one of them can use, I can simply specify that a "localhost" could use it, meaning any one of these 5 domains. Is this correct?

Thanks again.

Ahmad
09-03-2002, 01:04 PM
Originally posted by coffin
Thanks, DayGlo.

So, if I have five domains on one server and I've got a single script that any one of them can use, I can simply specify that a "localhost" could use it, meaning any one of these 5 domains. Is this correct?

Thanks again.

That won't work most of the time. It depends on how the script is doing the check and how is your server configured.

coffin
09-03-2002, 01:25 PM
Thanks Ahmad,

Thought that might be the case. Thanks for your advice.

bitserve
09-03-2002, 09:39 PM
The loopback device with an address of 127.0.0.1 has always been set up as an IP address that IP applications can use to talk to the host running the application. Localhost has always just been a name aliased to the loopback address.

OllieVH
09-04-2002, 01:09 AM
Originally posted by bitserve
The loopback device with an address of 127.0.0.1 has always been set up as an IP address that IP applications can use to talk to the host running the application. Localhost has always just been a name aliased to the loopback address.

Excellent Description, my thoughts exactly :)