-   Linux - Software (
-   -   apache virtual host (

navinc 05-21-2003 01:05 PM

apache virtual host
I have a virtual host setup in apache on a linux box as (IP
which I can browse on the linux via name or IP.
I can also browse via the IP but not the on my windows box over my lan.

please help me i am newbie, I have read so many documentation about DNS, BIND, and apache virtual hosting but i have not able to figure out.


trickykid 05-21-2003 01:48 PM

Re: apache virtual host

Originally posted by navinc
I can also browse via the IP but not the on my windows box over my lan.
What DNS servers are you using, your ISP's or maybe your own? Its most likely not knowing where to translate the name to IP, etc. You have to also make sure your registrar has the correct DNS information, along with the DNS server that actually points the name to IP, etc.

thedeud 05-21-2003 02:44 PM


can you post your <VirtualHost> container please. Also, what is in your /etc/hosts file?

vous 05-21-2003 02:46 PM

Are you on the same network segment? Have you tried just with the ip? What do your Apache logs say?

navinc 05-21-2003 03:24 PM

yes my linuxbox and winbox are in the same network segment
linuxbox IP and winbox
connected witha switch. It is a closed lan no internet connection.

my virtualhost
DocumentRoot /www/intranet/abc

hosts file has nc

my named.conf file has the zone

zone "" {
type master;
file "abc.db";

zone ""{
type master;
file "db.";

in my abc.db

I have IN A

in my reverse file
I have IN PTR

thedeud 05-21-2003 03:58 PM

your windows box dosent know that is supposed to point to

Is your windows box configured to search through the's NameServers, and if so, are the Name servers recursive?

One way you might be able to fix this would be:

If your runnning windows 2K, or XP edit the file


and add this to it:

navinc 05-21-2003 04:05 PM

i am running a linux redhat 9 server and I am trying to access through win XP I ahave the the name server and apache in the linux box

thedeud 05-21-2003 05:00 PM

Ok, but is win XP setup to use your RH9's nameservers for lookups? If it is not, it will search the internet for's ipaddress, which will return the wrong IP.

You RH9 box has this entry in its /etc/hosts file: nc

That is how your RH9 box know the ip for is, it won't even do a DNS lookup if that is in your host file.

Did you try the C:\WINDOWS\system32\drivers\etc\hosts fix above?

navinc 05-21-2003 05:29 PM

it works when i put the host name and IP into the hosts file of my winbox thanks
but as you said it does not look up the DNS so how would do I make my name server work

thedeud 05-21-2003 06:03 PM

I'm not too good with nameservers, but I'll give it a shot.

first, you need your nameservers to be setup to allow recursion. My NS is setup kinda like this:

options {
directory "/etc/named/";
allow-transfer {; };
recursion yes;

My NS actually says recursion no;, but I would imagine setting it to yes should work.

Next you would need to configure the WindowsXP box to use your RH9 servers DNS. This is done under the tcp/ip settings in under network connections (right-click on the connection, go to propreties).

navinc 05-22-2003 01:16 PM

thanks all
I guess now I need help setting up a DNS server in my LINUX box running RH 9. I want to setup my DNS server just for the local lan. It is a closed network.
Thanks in advance

All times are GMT -5. The time now is 12:44 AM.