Solved

DNS and virtual server

Posted on 2001-09-10
38
1,682 Views
Last Modified: 2013-11-18
hi

iam using apache in windows 2000
iam using apache for intranet

i have configured my apache like this

Listen 80
     Listen 8080
     
     
     <VirtualHost 192.168.1.159:80>
     ServerName local.xxx.com
     DocumentRoot D:/newxxx
     </VirtualHost>
     
     <VirtualHost 192.168.1.159:8080 >
     ServerName old.xxx.com
     DocumentRoot D:/old
     </VirtualHost>

when i try to access through http://old.xxx.com or http://local.xxx.com iam not able to access it but iam able to access it using ip and port name

now i want to know how can i make the url http://old.xxx.com work

thanks
shiva
0
Comment
Question by:webmaster_prodex
  • 16
  • 14
  • 6
  • +2
38 Comments
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
you need to add thes FQDN to your DNS server (or hosts file)
0
 

Author Comment

by:webmaster_prodex
Comment Utility
i dont clearly get your point can u explain wat i have to do

i suppose that FQDN is to make the url global but mine is a intranet.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
> .. but mine is a intranet.
And where do you think knows the system (in this case your browser) what  http://old.xxx.com is?
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Configure your local DNS server to include both hosts on the same IP nr.
0
 

Author Comment

by:webmaster_prodex
Comment Utility
we dont have any seperate DNS server so were should i change this in windows 2000 server (i couldnt find any seperate service running for DNS in my server)
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Usually the same server as your DHCP server has some DNS capabilities.

An alternative is to configure the HOSTS file to contain both hosts at each machine of your network. This is a very Unix-like solution and a replacement for DNS. I am not sure how this works exactly under Windows, so try it out. Maybe just create a text file named HOSTS in the system directory.
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Try link http://www.tcimet.net/support/hostsfil.htm (its about Win95, but this should work for newer OSes as well).
0
 

Author Comment

by:webmaster_prodex
Comment Utility
now i have added the host name in the host file which exist in the system directory (i think this is the file containning the dns info)

also eariler while i restarted the server i got a error message saying that it could not find a map for the DNS name that error has vanished but..!!

still the page is not being displayed (i also tryied restarting the my whole system)

do u have any other answer
0
 

Author Comment

by:webmaster_prodex
Comment Utility
now i have added the host name in the host file which exist in the system directory (i think this is the file containning the dns info)

also eariler while i restarted the server i got a error message saying that it could not find a map for the DNS name that error has vanished but..!!

still the page is not being displayed (i also tryied restarting the my whole system)

do u have any other answer
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
It's difficult to say what's going wrong. Did you try to access the pages with the ip-nr instead of the names? When this does fail, too, then you have a problem with the Apache setup. Then I can't help you any more because I don't know Apache well enough to find the cause of the error. I helped you here because I felt that you had a DNS problem and I have experience with DNS problems...

I am sorry.

In your case I would try the following:

1. Use the ip-nr instead of DNS name. If it's working, then  your HOSTS setup didn't work. If it's not working, then your Apache setup didn't work.

2. If the Apache setup didn't work, I would reinstall Apache completely and try to access the server via localhost.  When this works, then carefully modify the setup till everything is working, but check often that you don't miss anything!

Good luck!
0
 

Author Comment

by:webmaster_prodex
Comment Utility
iam able to access it with ip and the port

ie like 192.168.1.159:80 and 192.168.1.159:8080
the corresponding map in the DNS is old.xxx.com and local.xxx.com which is notworking i suppose my apache is working perfectly without any problem.

is there any other way u can suggest

any way thanks for ur help
shiva
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Then the solution with the HOSTS file definitively didn't work! :-(

An idea, did you try these urls as written exactly?

http://old.xxx.com

and

http://local.xxx.com:8080

because DNS doesn't map ports!
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
0
 

Author Comment

by:webmaster_prodex
Comment Utility
iam able to access it with ip and the port

ie like 192.168.1.159:80 and 192.168.1.159:8080
the corresponding map in the DNS is old.xxx.com and local.xxx.com which is notworking i suppose my apache is working perfectly without any problem.

is there any other way u can suggest

any way thanks for ur help
shiva
0
 

Author Comment

by:webmaster_prodex
Comment Utility
i also tried


http://old.xxx.com

and

http://local.xxx.com:8080

the above and it is not working
0
 

Author Comment

by:webmaster_prodex
Comment Utility
i also tried


http://old.xxx.com

and

http://local.xxx.com:8080

the above and it is not working
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Then you need to set up DNS on your local area network correctly. HOSTS files are a way, but not the only one. There are many possibilities what can go wrong with your DNS setup, and it's too difficult to tell what's the problem. Usually the supporter would come to your office and look what's the problem, I think.

Read the two links about DNS carefully till you find out what the problem is yourself.

I am sorry.
0
 

Author Comment

by:webmaster_prodex
Comment Utility
i also tried


http://old.xxx.com

and

http://local.xxx.com:8080

the above and it is not working
0
 

Author Comment

by:webmaster_prodex
Comment Utility
hi dnoelpp,

thanx for ur help
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

Author Comment

by:webmaster_prodex
Comment Utility
hi dnoelpp,

thanx for ur help
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Just a note --

Perhaps you shouldn't press the "Refresh" key of your browser. Because if you have posted some texted, your browser repost the same text... If you need to refresh the page, there's a Reload Question button in the upper right corner which does the task.
0
 

Author Comment

by:webmaster_prodex
Comment Utility
actually i didnt c the same questions repeating just now i saw it being repeated, any way thankyou
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
You should accept one of my comments as an answer if you were satisfied. I discovered that this question was one of the four you posted but you didn't accept an answer of any of them.

Thank you
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
if you have added the entries into the HOSTS file, it should work.
Either you typed it in the wrong file, or used a wrong syntax, or you have disabled using hosts file.
Your problem is realy simple: as mentioned before either HOSTS file or a working DNS (even on another host) might do it.

Please post result of:    ipconfig -all
Also post the full path of the HOSTS file you modified, and the lines you wrote there.
0
 

Author Comment

by:webmaster_prodex
Comment Utility
here are the result of ip config (my exact dns is old.egrabber.com,local.egrabber.com)

Windows 2000 IP Configuration

        Host Name . . . . . . . . . . . . : sivakumar
        Primary DNS Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Broadcast
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : Realtek RTL8139(A) PCI Fast Ethernet
 Adapter
        Physical Address. . . . . . . . . : 00-02-44-09-18-3A
        DHCP Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.168.1.159
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :
        DNS Servers . . . . . . . . . . . : 127.0.0.1

C:\WINNT>ipconfig /displaydns

Windows 2000 IP Configuration

   localhost.
   ------------------------------------------------------
     Record Name . . . . . : localhost
     Record Type . . . . . : 1
     Time To Live  . . . . : 31535550
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     A (Host) Record . . . :
                       127.0.0.1


   1.0.0.127.in-addr.arpa.
   ------------------------------------------------------
     Record Name . . . . . : 1.0.0.127.in-addr.arpa
     Record Type . . . . . : 12
     Time To Live  . . . . : 31535550
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     PTR Record  . . . . . :
                       localhost


   159.0.168.192.in-addr.arpa.
   ------------------------------------------------------
     Record Name . . . . . : 159.0.168.192.in-addr.arpa
     Record Type . . . . . : 12
     Time To Live  . . . . : 31535550
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     PTR Record  . . . . . :
                       local.egrabber.com

     Record Name . . . . . : 159.0.168.192.in-addr.arpa
     Record Type . . . . . : 12
     Time To Live  . . . . : 31535550
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     PTR Record  . . . . . :
                       old.egrabber.com


   old.egrabber.com.
   ------------------------------------------------------
     Record Name . . . . . : old.egrabber.com
     Record Type . . . . . : 1
     Time To Live  . . . . : 31535550
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     A (Host) Record . . . :
                       192.168.0.159


   local.egrabber.com.
   ------------------------------------------------------
     Record Name . . . . . : local.egrabber.com
     Record Type . . . . . : 1
     Time To Live  . . . . : 31535550
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     A (Host) Record . . . :
                       192.168.0.159


can u find any thing with this plz help me

0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
>       Default Gateway . . . . . . . . . :
>       DNS Servers . . . . . . . . . . . : 127.0.0.1

As you can see from your ipconfig settings, you have defined to use your own machine as DNS Server.
Also there is no default route, but this should not be a problem now 'cause you told us that ping works.

So, you either have to setup DNS on your machine, or use proper settings in %SystemRoot%\system32\drivers\etc\hosts

>        Node Type . . . . . . . . . . . . : Broadcast
you also should use Node-Type hybrid in heterogenous networks (AFAIK this changes automatically, see below)

The you're missing:
         NetBIOS Resolution Uses DNS : Yes
to change this go to Network Neighborhood->Properties->TCP
and click the appropriate checkbox, also enable the checkbox for HOSTS (or LMHOSTS) resolution.

After all these changes you need, as always ever when a single bit changes at M$, to reboot ;-)

If done, your resolution works, if not reread my previous comment (about the postings) and this comment again.
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Let's continue on the path with the hosts file.

One possible problem is: did you install the HOSTS file on the computer where you called the URL? Because if you use this solution, then EACH machine needs this file, not only the server.

Another problem is that you maybe made a mistake in formatting the file. (use only ASCII characters, using tabs instead of spaces, etc.)

Or, the file is in the wrong directory.

You see, this is already a list, and I was only starting...



**** ****

Okay, let's try something (it's working for me on Windows 2000).

Open the HOSTS file in C:\WINNT\System23\Drivers\etc and add a line as exactly shown here (maybe replace your xxx with the real value).

192.168.1.1  old.xxx.com

Then try ping old.xxx.com, it should ping your webserver computer. Editing hosts file has immediate effect.

When this worked, you can add the other entry in a similar way and try to ping the other entry, too.

Then try to access the webserver from the SAME computer.

When you're successful, then you have to repeat this for every computer in your local network. (Or install a local DNS server, Microsoft delivers one with Windows 2000 Server).

**** ****
0
 

Author Comment

by:webmaster_prodex
Comment Utility
thankyou so much dnoelpp

i got it last time while writing the host i had made a mistake like i had typed the ip incorectly

thanks
shiva
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
That's very typical for this type of problem. Such things happen to me all the time, and then I just have a check list and check each item extra carefully at least thrice (three times)...
0
 
LVL 3

Accepted Solution

by:
dnoelpp earned 200 total points
Comment Utility
That's very typical for this type of problem. Such things happen to me all the time, and then I just have a check list and check each item extra carefully at least thrice (three times)...
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Now it happened to me, too (two identical posts... :-)
0
 

Expert Comment

by:wapware
Comment Utility
Ok so here it goes....

The sytax should be....
NameVirtualHost 192.168.1.159:8080
<VirtualHost 192.168.1.159:80>
blah blah
</virtual host>
<VirtualHost 192.168.1.159:80>
blah blah
</virtual host>

NameVirtualHost 192.168.1.160:8080
<VirtualHost 192.168.1.160:80>
blah blah
</virtual host>
<VirtualHost 192.168.1.160:80>
blah blah
</virtual host>


0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
This was a DNS problem, not an Apache configuration problem.
0
 
LVL 1

Expert Comment

by:Zook
Comment Utility
just reading this thread....

webmaster_prodex,

don't dare to give "dnoelpp" everything less than "A+" for his comments ;-)

cu
Zook
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
not that I just answer for points, but could someone please explain *this* grading?
So future readers might get a glue what is the answer know.

dnoelpp said that it was a DNS problem, not bad. And webmaster_prodex said that he had a typo in his hosts file, something that I assumed in my eraly comments.
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
Thanks, Zook, but I think, ahoffmann could have deserved the points as well. I just was trying to give a clear and a bit verbose but not boring help... (much like I would teach a group of teenagers the basics about computer networking :-) Thanks, webmaster_prodex for the points.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
no, don't talk about the points (think I've got enough:)
just clarify what was the right answer
0
 
LVL 3

Expert Comment

by:dnoelpp
Comment Utility
I am afraid, this thread won't be very useful. Somehow my comments helped webmaster_prodex to solve his problem. We all got a bit confused in this process... So, EE, if you want to produce a good QnA library, let's scrap this thread.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

How to fix error ""Failed to validate the vCentre certificate. Either install or verify the certificate by using the vSphere Data Protection Configuration utility" when you are trying to connect to VDP instance from Vcenter.
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now