LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache virtual host (http://www.linuxquestions.org/questions/linux-software-2/apache-virtual-host-61007/)

navinc 05-21-2003 12:05 PM

apache virtual host
 
I have a virtual host setup in apache on a linux box as nc.abc.net (IP 192.168.1.1)
which I can browse on the linux via name or IP.
I can also browse via the IP but not the nc.abc.net 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.

navinc

trickykid 05-21-2003 12:48 PM

Re: apache virtual host
 
Quote:

Originally posted by navinc
I can also browse via the IP but not the nc.abc.net 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 01:44 PM

navinc

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

vous 05-21-2003 01: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 02:24 PM

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

my virtualhost
<VirtualHost 192.168.1.1>
ServerAdmin hostmaster@abc.net
ServerName nc.abc.net
DocumentRoot /www/intranet/abc
</VirtualHost>

hosts file has

192.168.1.1 nc.abc.com nc


my named.conf file has the zone

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

zone "1.1.168.192.in-addr.arpa"{
type master;
file "db.192.168.1.1";
};

in my abc.db

I have nc.abc.net. IN A 192.168.1.1

in my reverse file
I have 1.1.168.192.in-addr.arpa. IN PTR nc.abc.net.

thedeud 05-21-2003 02:58 PM

your windows box dosent know that 192.168.1.1 is supposed to point to nc.abc.com

Is your windows box configured to search through the abc.com'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

C:\WINDOWS\system32\drivers\etc\hosts


and add this to it:

192.168.1.1 nc.abc.com

navinc 05-21-2003 03: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 04: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 nv.abc.com's ipaddress, which will return the wrong IP.

You RH9 box has this entry in its /etc/hosts file:
192.168.1.1 nc.abc.com nc

That is how your RH9 box know the ip for nc.abc.com is 192.168.1.1, 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 04: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 05: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 { 127.0.0.1; };
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 12:16 PM

DNS SERVER SETUP HELP IN RH 9
 
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 02:41 PM.