Forum Moderators: open

Message Too Old, No Replies

Viewing a Test Site On My Server

Test Site

         

Soccer_Box

5:47 pm on May 31, 2006 (gmt 0)

10+ Year Member



I am currently building a new site, my hosting company are hosting this site on a different server so that it does not interfere with my current server, they have sent me the following instructions so that only I can see it in my browser, as follows

Basically open this in notepad and add the following line to it:

12.34.567.890 www.********.com *********.com

Save the file, and close all your browsers, then open up the ms dos
command prompt which is usually found at,

Start, All Programs, Accessories, then Command Prompt,

Open this and type the following:

ipconfig /flushdns

then type

ping **********.com

These instructions work fine at my workplace but I need to work from home to push the site along but no matter what I do it will not show the new site in my browser, I have tried closing all firewalls but it is not working, can anyone help?

Many Thanks

John

[edited by: encyclo at 6:51 pm (utc) on May 31, 2006]
[edit reason] obfuscated IP address [/edit]

topr8

5:52 pm on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i have no idea what the problem is, but why not just install a webserver on your home machine?

something like webserv (search google) will install apache php perl etc in one go,

if you want a windoes server then install iis on your local machine (difficult i hear on xp home edition)

Soccer_Box

5:54 pm on May 31, 2006 (gmt 0)

10+ Year Member



topr8, Thank you for the reply I am a novice, how does this work?

John

john_k

6:48 pm on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Although you omit the name of the file being edited, the instructions sent to you by your hosting company appear to be for the "hosts" file. Did you save that information to the hosts file on your home machine?

Typically, on a windows machine, that file can be found with this path:
c:\windows\system32\drivers\etc\hosts

The file does not have any extension. After you save it with notepad, make sure that a ".txt" extension has not been added to your file.

Soccer_Box

7:14 pm on May 31, 2006 (gmt 0)

10+ Year Member



Yes I did, as I say it works on the computer at my workplace but not at my home computer.

john_k

7:29 pm on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the entry is in the hosts file then something else is blocking it.

Possible causes:
- domain is not correctly entered in the hosts file
- IP address is incorrect
- hosts file is not where your OS is looking for it
- firewall is blocking your traffic
--- firewall on your computer
--- firewall on your router/modem
--- firewall at your ISP
--- firewall at your host (only allowing traffic from your work IP)

To verify that the entry is in your hosts file AND being utilized by your TCP/IP, try pinging the IP address with the -a switch:

ping -a 12.34.567.890

(enter the correct IP of course)

The PING program will first do a reverse lookup on the IP address. It should echo back the first entry from your hosts file with something like this:

Pinging www.example.com [12.34.567.890] with 32 bytes of data:
If you don't see that, then your OS is not reading the same "hosts" file that you are editing.

Soccer_Box

7:33 pm on May 31, 2006 (gmt 0)

10+ Year Member



I did ping the site and everything was fine.

john_k

7:43 pm on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Who is your ISP? Maybe there is a proxy server involved?

Another option for you to consider is to have your host create a regular DNS entry. Something like "staging.example.com" or "demo.example.com".

btw - when you say it doesn't work, to you mean that it shows the regular website? Or do you mean it gives you some kind of "DNS or server not found error?"

Soccer_Box

7:43 pm on May 31, 2006 (gmt 0)

10+ Year Member



This is what it looks like now but it still will not work.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Owner>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\Documents and Settings\Owner>ping nicesite.com

Pinging www.nicesite.com [70.87.117.101] with 32 bytes of data:

Reply from 70.87.117.101: bytes=32 time=174ms TTL=43
Reply from 70.87.117.101: bytes=32 time=165ms TTL=43
Reply from 70.87.117.101: bytes=32 time=162ms TTL=43
Reply from 70.87.117.101: bytes=32 time=162ms TTL=43

Ping statistics for 70.87.117.101:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 162ms, Maximum = 174ms, Average = 165ms

C:\Documents and Settings\Owner>^V

Soccer_Box

7:44 pm on May 31, 2006 (gmt 0)

10+ Year Member



It shows the regular website.

Dijkgraaf

9:17 am on Jun 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It could be a caching issue.

Try clearing the cache of your browser.
Then open the site.
If it is still showing to old site
Press Ctrl+F5

Soccer_Box

5:59 pm on Jun 1, 2006 (gmt 0)

10+ Year Member



Thanks for your advice but it is still the same.