Forum Moderators: phranque

Message Too Old, No Replies

virtual host

         

khalil

11:32 am on Feb 9, 2004 (gmt 0)

10+ Year Member



I'm runing apache 1.3 on win2k on a LAN, i configured the server without any problem, the server is listening to my IP 192.168.0.1:80. But :( when i try to make a virtual host:

NameVirtualHost 192.168.0.1:80

<VirtualHost 192.168.0.1:80>
ServerName host_1
DocumentRoot c:/www/host_1
</VirtualHost>

<VirtualHost 192.168.0.1:80>
ServerName host_2
DocumentRoot c:/www/host_2
</VirtualHost>

i can't open the host_2 in IE. when i'm pinging host_1 it's replying but host_2 NO!

where is the problem?

PS: using different IP for each host is working just perfect...

lemat

3:25 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



Did you updated your DNS zone?
you should tell your users's OS-es that host_1 and host_2 have the same IP.

khalil

3:51 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



:( what do you mean by updating my dns? can you explain plase!

lemat

4:50 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



Simply edit file
c:\winnt\system32\drivers\etc\hosts
and add 2 new lines:
192.168.0.1 host_1
192.168.0.1 host_2

on EVERY windows client, you want to connect to your serwer
and modify /etc/hosts or named or djbdns config on *nix ones.

or just ask your ISP to add similiar entries for your LAN in his DNS serwer.

khalil

6:38 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



Cool! thanx! it's working fine...
But one more question (:
EVERY windows client must make the changes to the hosts file? there is no other way... i mean can we resolve this problem without making any changes on Every windows client machine?

lemat

7:16 am on Feb 10, 2004 (gmt 0)

10+ Year Member



Open network->tcp/ip properties, look at DNS entries (usually two or more IP numbers)

ask the administartors of these to add config for your LAN to the DNS zone file.

and of course every client in your LAN should have the same DNS setup.

and of course you can set up your own DNS server and make your LAN use it.