LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   internal webserver (https://www.linuxquestions.org/questions/linux-networking-3/internal-webserver-332172/)

Sern 06-10-2005 07:42 AM

internal webserver
 
is there anyway to have 2 clients on a LAN see a certain website if the queried say like if i had 192.168.1.2 and 192.168.1.3 and i wanted querys for test.com to only resovle to the apache server for those ips only and the rest to resolve to the real test.com ho could i do that?

acid_kewpie 06-10-2005 07:46 AM

ok, little confusing there, but i *think* you mean you just want two individual LAN machines to resolve a domain to one local IP, instead of the real address? easy, just add the fake details to /etc/hosts. note that this is totally seperate to any actual webserving going on.

Sern 06-10-2005 07:56 AM

add fake hosts? explain please , i am sort of new

but yes your right about what i am tring to do

acid_kewpie 06-10-2005 01:46 PM

you simply lie to each machine about what the IP is. open up /etc/hosts and add a line at the bottom, for example "192.168.0.1 microsoft.com". the hosts file is the very first port of call when resolving a host, so anythign in there will be used by the machine first off.

Sern 06-11-2005 12:26 PM

thank you very much


All times are GMT -5. The time now is 07:20 AM.