LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-21-2003, 01:05 PM   #1
navinc
LQ Newbie
 
Registered: May 2003
Posts: 13

Rep: Reputation: 0
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
 
Old 05-21-2003, 01:48 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
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.

Last edited by trickykid; 05-21-2003 at 01:50 PM.
 
Old 05-21-2003, 02:44 PM   #3
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Rep: Reputation: 0
navinc

can you post your <VirtualHost> container please. Also, what is in your /etc/hosts file?
 
Old 05-21-2003, 02:46 PM   #4
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Rep: Reputation: 30
Are you on the same network segment? Have you tried just with the ip? What do your Apache logs say?
 
Old 05-21-2003, 03:24 PM   #5
navinc
LQ Newbie
 
Registered: May 2003
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 05-21-2003, 03:58 PM   #6
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Rep: Reputation: 0
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
 
Old 05-21-2003, 04:05 PM   #7
navinc
LQ Newbie
 
Registered: May 2003
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 05-21-2003, 05:00 PM   #8
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Rep: Reputation: 0
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?
 
Old 05-21-2003, 05:29 PM   #9
navinc
LQ Newbie
 
Registered: May 2003
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 05-21-2003, 06:03 PM   #10
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Rep: Reputation: 0
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).
 
Old 05-22-2003, 01:16 PM   #11
navinc
LQ Newbie
 
Registered: May 2003
Posts: 13

Original Poster
Rep: Reputation: 0
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

Last edited by navinc; 05-22-2003 at 01:20 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - Name virtual host tisource Linux - Networking 5 03-03-2006 03:52 AM
Apache 2.0 Virtual Host? w0lfeyes Linux - Networking 1 05-03-2004 04:09 PM
apache and virtual host diverge Linux - Networking 2 01-11-2004 03:45 AM
Virtual host and apache Samspeed Linux - General 8 08-06-2003 08:41 AM
apache virtual host mimi Linux - General 1 04-06-2002 06:11 AM


All times are GMT -5. The time now is 09:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration