Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Local Development


Air - 5:28 pm on Jul 6, 2001 (gmt 0)


Alex, are you on a *nix or windows machine?

On windows, find a file named "hosts" in the "windows" directory and add your host name(s) with the localhost address 127.0.0.1, if you don't have a "hosts" file, then you will have to create one using a text editor. Use "HOSTS.SAM" also in the windows directory as an example (you can open it with notepad).

On *nix edit the file /etc/hosts and add "mydomain.com" with 127.0.0.1, leaving the other entries intact.

In case you decide to add other hosts to your set up:
With name based hosting in Apache you can have multiple domains all with 127.0.0.1, if that is the case, just keep adding them to the "hosts" file and Apache will present the appropriate site based on the domain name entered. So you could have mydomain.com, mydomain1.com, mydomain2.com, etc. defined in virtual host containers and as long as you have entries in DNS or a "hosts" file the correct sites are displayed.

Have fun!


Thread source:: http://www.webmasterworld.com/apache/430.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com