Networking Forums

Networking Forums > Computer Networking > Linux Networking > Is it always possible to refer to local network as localhost??

Reply
Thread Tools Display Modes

Is it always possible to refer to local network as localhost??

 
 
markus
Guest
Posts: n/a

 
      08-22-2004, 07:14 PM
I don't have access to a linux server to check. When testing programs
locally (not on a LAN) in my Windows computer with Apache I refer to
the server as I use

http://127.0.0.1/myfile.php OR http://localhost/myfile.php

What address will I have to use on a typical linux/unix network with
apache installed?.

1. Can I also use localhost or 127.0.0.1 instead of the IP number??.


2. Can I give a name (like http://myownserver//myfile.php to the
server to use instead of the ip or localhost.


Thanks.
 
Reply With Quote
 
 
 
 
Marcelo Rodrigues
Guest
Posts: n/a

 
      08-22-2004, 10:03 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

markus wrote:

> http://127.0.0.1/myfile.php OR http://localhost/myfile.php
>
> What address will I have to use on a typical linux/unix network with
> apache installed?.


Same thing. Both of them should work.

[]s

- --
Página oficial u-br: http://u-br.tk
Fale com os admins: u-br.admin
Veja as novidades da u-br: u-br.admin.avisos
Linux Counter user #208269
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBKRhP977gajvh3yYRAh+2AJ9Nf7SgFqTojF1cSFChyn Jz8POUhACgiEHt
UQoRibc7vHMP58x/NqqE4Wc=
=Qhqt
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Alexander Clouter
Guest
Posts: n/a

 
      08-22-2004, 10:46 PM
On 2004-08-22, markus <(E-Mail Removed)> wrote:
> I don't have access to a linux server to check. When testing programs
> locally (not on a LAN) in my Windows computer with Apache I refer to
> the server as I use
>
> http://127.0.0.1/myfile.php OR http://localhost/myfile.php
>
> What address will I have to use on a typical linux/unix network with
> apache installed?.
>

Well with Apache you should make sure you (if using Virtual Hosting, do not
worry not) that you are bind'ing to the correct interface/port and that the
'ServerName'/'ServerAlias' lines are sane, otherwise things will not work. I
am assuming for your LAN you probably are not using virtual hosting

> 1. Can I also use localhost or 127.0.0.1 instead of the IP number??.
>

You can type whatever you want, as long as the name resolves to an IP address
you should find everything is happy.

> 2. Can I give a name (like http://myownserver//myfile.php to the
> server to use instead of the ip or localhost.
>

You have two options, you could run a DNS server, or if this is really for
just your own computer then you could probably get away with dropping more
entries into /etc/hosts. The format is quite clear inside the file.

I personally would probably look to playing with a simple local DNS server,
but thats just me

Have fun

Regards

Alex
 
Reply With Quote
 
Davide Bianchi
Guest
Posts: n/a

 
      08-23-2004, 06:39 AM
On 2004-08-22, markus <(E-Mail Removed)> wrote:
> What address will I have to use on a typical linux/unix network with
> apache installed?.


The name of the machine if you have a DNS available, the IP of the
machine otherwise.

Davide

--
Whatever is not nailed down is mine. What I can pry loose is not
nailed down.
-- Collis P. Huntingdon
 
Reply With Quote
 
Matt Strandberg
Guest
Posts: n/a

 
      09-20-2004, 06:43 PM
If this is all going to be local, your hostname will resolve itself into its
IP address. So, if your hostname is "hostname" then you can use that, but
only locally; otherwise, implement a DNS server.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable short route via localhost on dual network interface Andreas Wassatsch Linux Networking 2 11-26-2007 05:27 AM
Anyone want me to refer them on Eclipse? Bryan Anderson Broadband 6 01-31-2006 02:56 AM
anyone one to refer me to Pipex :) ¬Stephen Hammond Broadband 7 10-27-2005 01:29 PM
Plusnet refer a friend - Anyone want me to refer them? Dan Broadband 3 07-28-2005 11:23 PM
Anyone want to refer me to Pipex... Mungo \two sheds\ Toadfoot Broadband 11 09-06-2003 09:05 AM



1 2 3 4 5 6 7 8 9 10 11