Apache, Virtual Hosts, Linux hosts file

Grant Cullen jadall-Zd07PnzKK1IAvxtiuMwx3w at public.gmane.org
Wed Mar 30 01:02:50 UTC 2005


Stephen wrote:

> I have a Linux box (Mandrake 10.1) running Apache 2.0.
>
> I am using it for testing of PHP-MySQL  scripts.
>
> I have it working, but I had to map the virtual urls to the Linux 
> box's ip address in the Linux hosts file.
>
> I am using a web browser on another machine on my network. If I do not 
> have the entries in the Linux box's hosts file, I get the default 
> Apache welcome page.
>
> I am not using DNS, just entries in the hosts file on the machine I am 
> running the browser on.
>
> Why do I need the entry in the Linux box's hosts file? I am 
> considering the possibility that I have a configuration problem. She 
> not the entry in the VHosts.conf file for the virtual hosts be 
> sufficient?
>
> I am not trying to use a browser on the Linux box!
>
> Thanks in advance!

The VHosts.conf give you your mapping to application.  The host file 
resolves the name to IP to find the correct box.  If you were running a 
dns server the same would be true, name to IP mapping.

Grant Cullen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list