Link to home
Start Free TrialLog in
Avatar of webmaster_prodex
webmaster_prodex

asked on

DNS and virtual server

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
Avatar of ahoffmann
ahoffmann
Flag of Germany image

you need to add thes FQDN to your DNS server (or hosts file)
Avatar of webmaster_prodex
webmaster_prodex

ASKER

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.
> .. but mine is a intranet.
And where do you think knows the system (in this case your browser) what  http://old.xxx.com is?
Configure your local DNS server to include both hosts on the same IP nr.
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)
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.
Try link http://www.tcimet.net/support/hostsfil.htm (its about Win95, but this should work for newer OSes as well).
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
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
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!
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
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!
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
i also tried


http://old.xxx.com

and

http://local.xxx.com:8080

the above and it is not working
i also tried


http://old.xxx.com

and

http://local.xxx.com:8080

the above and it is not working
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.
i also tried


http://old.xxx.com

and

http://local.xxx.com:8080

the above and it is not working
hi dnoelpp,

thanx for ur help
hi dnoelpp,

thanx for ur help
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.
actually i didnt c the same questions repeating just now i saw it being repeated, any way thankyou
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
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.
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

>       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.
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).

**** ****
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
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)...
ASKER CERTIFIED SOLUTION
Avatar of dnoelpp
dnoelpp
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Now it happened to me, too (two identical posts... :-)
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>


This was a DNS problem, not an Apache configuration problem.
just reading this thread....

webmaster_prodex,

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

cu
Zook
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.
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.
no, don't talk about the points (think I've got enough:)
just clarify what was the right answer
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.