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