|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hello,
I'm a first timer here so please be patient..I'm having a problem sorting out how to test our external site (Haven't assign a domain / dns yet).. What we want is to test the site located in 203.98.XX.XX using a dummy domain name www.dummytest.com.au .. I have read that to be able to use this functionality, You need to add a line in your hosts file (I'm using windows 2000 Prof) something like 203.98.XX.XX www.dummytest.com.au In the 203.98.XX.XX box, I have already set-up apache (Name based) for www.dummytest.com.au. But when I type the site to my browser (IE explorer), it just keep on gining a an error message "Cannot find server or DNS Error "... Could you give me some insightes here...Thanks in advance... |
|
#2
|
|||
|
|||
|
You can't blindly create www.dummytest.com.au at 203.98.XX.XX. To test the Apache at 203.98.XX.XX simply type in http://203.98.XX.XX, it's that simple.
>> when I type the site to my browser (IE explorer) Using IE is a dummy in the first place. |
|
#3
|
|||
|
|||
|
Sorry, but let me know if I am wrong.. My understanding of hosts file is that if if include an info like
203.98.XX.XX www.dummytest.com.au What will happen here is that instead of going to athe proper dns server, the browser or the "connection" will somehow go and communicate straight to whatever ip address I have specified, in this case 203.98.XX.XX. Since the domain name dummytest.com.au is set-up in that server (web server is Apacje) (203...), it should give me back the default/initial page.. We can use hosts file in this sense if we wanted to test a site that hasn't been allocated a proper domain name. Am I right??? What wrong with using the hosts file in this way?? |
|
#4
|
|||||
|
|||||
|
Quote:
Correct Quote:
Quote:
If Apache at 203.98.XX.XX doesn't recognize www.dummytest.com.au as a qualified ServerName, it simply won't answer to any www request. That said, you can't blindly create www.dummytest.com.au at 203.98.XX.XX. At 203.98.XX.XX, you need to be to ping www.dummytest.com.au and make sure it solves to 203.98.XX.XX otherwise Apache just won't accept that ServerName. |
|
#5
|
||||
|
||||
|
It could actually be this. You are behind a router, and you're trying to connect to your public IP. This just doesn't work for many different routers. So I want you to try to LOCALLY connect to your loopback IP, your private IP, and public IP directly without using a domain name. If the private IP works but not the public IP, then you should set the domain name to your private IP in the hosts file.
If you can't connect with any of those IP's locally, then I want you to make sure apache is even listening on the port. netstat -an | find "0.0.0.0:80" Do the above at the console and if you get anything in response then your apache server is running.
__________________
Send me a private message if you would like me to setup your DNS for you for a price of your choosing. This is the preferred method if your DNS needs to be fixed/setup fast and you don't have the time to bounce messages back and forth on a forum. Also, check out these links: Whois Direct | DNS Crawler | NS Trace | Compare Free DNS Hosts |
|
#6
|
|||
|
|||
|
I still don't understand the use of hosts file in this case..I tried to ping www.dummytest.com.au to our server box and it give me this message
[testman /etc]# ping www.dummytest.com.au PING www.dummytest.com.au (203.98.XXX.XX): 56 data bytes 64 bytes from 203.98.XXX.XX: icmp_seq=0 ttl=255 time=0.1 ms 64 bytes from 203.98.XXX.XX: icmp_seq=1 ttl=255 time=0.0 ms 64 bytes from 203.98.XXX.XX: icmp_seq=2 ttl=255 time=0.0 ms --- www.dummytest.com.au ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss From the look of it, it seems apache does recognize the domain I have created www.dummytest.com.au. The hosts file works when I test it locally (apache is running in my computer. In then add an entry in the hosts file Win 2K something like this 127.0.0.1 www.dummy.com). ======== With regards to the router issue, How would I know that's is the case..Do have I to initialize something so that the router would allow me to connect to the public IP (203.98.XXX.XX).. Still when I type the site address , it still give this DNS server not found message... |
|
#7
|
||||
|
||||
|
I already gave you enough information to solve your problem, however, since I was not clear enough, I need detailed information so that I can step ya through it.
Q1) What is your public IP Q2) What is the private IP apache runs on Q3) What is your public website domain (if any) Q4) What is your private website domain (for local testing) Q5) Are you using Virtual Hosts in httpd.conf? If so, I want to see a copy Q6) What is the response to >netstat -an | find "0.0.0.0:80" Q7) What is in your hosts file As for connecting to your public IP... It may be possible to get it to work by manipulating the router's routing table. However, this is not necessary. Connecting to your public IP is not necessary. |
|
#8
|
|||
|
|||
|
Thanks for replying..Here are the info you requested.
Q1) What is your public IP 203.98.92.141 Q2) What is the private IP apache runs on same ip address 203.98.92.141 Q3) What is your public website domain (if any) For this particular box, we don't have public website domain Q4) What is your private website domain (for local testing) For testing i'm using www.dummytest.com.au This is just for testing purposes. When the time comes to lunch this site, we will provide a meaningful name. BTW I have created www.dummytest.com.au in apache server. Q5) Are you using Virtual Hosts in httpd.conf? If so, I want to see a copy NameVirtualHost 203.98.92.141 : : <VirtualHost 203.98.92.141> ServerName www.dummytest.com.au ServerAdmin admin DocumentRoot /home/sites/site2/web RewriteEngine on RewriteCond %{HTTP_HOST} !^203.98.92.141(:80)?$ RewriteCond %{HTTP_HOST} !^www.dummytest.com.au(:80)?$ RewriteRule ^/(.*) http://www.dummytest.com.au/$1 [L,R] RewriteOptions inherit AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site2/users/$1/web/$3 </VirtualHost> Q6) What is the response to >netstat -an | find "0.0.0.0:80" I run this command in the server with this result. [root /]# netstat -an | find "0.0.0.0:80" find: 0.0.0.0:80: No such file or directory Q7) What is in your hosts file I have 2 hosts file for you to look at.. Hosts file in my test computer (Win 2000 Prof) 203.98.92.141 www.dummytest.com.au 127.0.0.1 www.site1.com.au Hosts file in our server (Linux) 127.0.0.1 localhost 203.98.92.141 box4.bossa.net.au # main interf 203.98.92.141 www.dummytest.com.au Hope this helps. Thanks |
|
#9
|
|||
|
|||
|
Another thing I notices is that when I changed the hosts file to something like this
123.456.789.10 www.dummytest.com.au (123.456.789.10 is unknown here) I get the usual page saying that We can't find "www.dummytest.com.au" You can try again by typing the URL in the address bar above. Or, search the Web: . . . But using the real ip address of our server which is 203.98.92.141 www.dummytest.com.au it gives me something like Cannot find server or DNS Error It seems that It can reach the server but apache can't resolve the hostname (dummytest.com.au). Do you guys know what I mean? |
|
#10
|
|||
|
|||
|
Q7) Where is your hosts file? What's its full path and full name to this hosts file? Have you checked the checkbox to use LMHOST file at TCP/IP properties?
Q5) Why are you using vhost if www.dummytest.com.au is the only one? Where did you get your rewrite stuffs? They are incorrect. Why use AliasMatch and its path appears to be a non-Windows and you said you run Apache on win2k? |
|
#11
|
||||
|
||||
|
Yes some of your answers suggested a linux or unix box when I asked those questions thinking you were on a win2k box (that's what you said on your original post after all). I also thought you had a private network (behind a router). So are you on a windows or linux box and is there more than one and what are their purpose?
btw, if apache is indeed running on a win2k box, then I want you to execute the netstat command on that win2k box. |
|
#12
|
|||
|
|||
|
Ok, let me clarify again this correctly...
Main server were apache is running is in Linux box ip address is 203.98.XX.XX My test computer is (office) is running win 2K prof. Q7) Where is your hosts file? What's its full path and full name to this hosts file? Have you checked the checkbox to use LMHOST file at TCP/IP properties? **answer to this question is that I' have 2 hosts file 1 for both machine (Linux and win 2k) ** Yes, I have check LMHOST file at TCP/IP properties and it is checked (ticked) Q5) Why are you using vhost if www.dummytest.com.au is the only one? Where did you get your rewrite stuffs? They are incorrect. Why use AliasMatch and its path appears to be a non-Windows and you said you run Apache on win2k? ***What I have provided is just a portion of the httpd.conf..It is not the only domain that is currently set-up in the box ***Those rewrite stuff were generated by the interface (this linux box is actually a cobalt RAQ4). Same as with the AliasMatch |
|
#13
|
||||
|
||||
|
|
|
#14
|
|||
|
|||
|
When you're done with the DNS stuffs and have Apache problems, start a new thread in Apache forum and I will fix the rewrite stuffs for you. The existing rewrite stuffs that you have were so poorly generated.
|
|
#15
|
|||
|
|||
|
===Does this URL go to the right site?
===http://203.98.92.141 ..This is the main site for the server..I have added the domain www.dummytest.com.au to apache.. I have configured apache to as NameVirtualHost 203.98.92.141 |
![]() |
| Viewing: Dev Shed Forums > System Administration > DNS > Host file redirect |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |