Forum Moderators: phranque
My original site is in /var/www/html
I can see my old site when I type my unique IP into a browser but how do I see the files in new domain without moving the files to /var/www/html/newdomain?
(I haven't setup the NS to point here yet. I want to make sure everything's working first)
If you wanted to test it without updating the DNS, you could edit the HOSTS file on your computer. The file is located in c:\winnt\system32\drivers\etc\hosts (or c:\windows\system32\drivers\etc\hosts depending on which version of Windows you have). If you add a newline at the bottom with:
111.222.333.444 example.com
Substitute your unique IP address and the new domain name, and then you should be able to request that new domain. You may have to restart your browser.
1) You type in example.com in your browser.
2) Your computer attempts to resolve this domain to an IP address. The first place it looks is your HOSTS file, then it tries DNS.
3) If it resolved, then a request is sent to that IP address, which contains the domain name that you typed in.
4) The web server at that IP address does one of two things:
a. If it's configured for only one domain, it returns the default site.
b. If it's configured for multiple domains using "Virtual Aliasing", then it looks up the location based on the domain name it was provided.
Back to the problem at hand, you said it's still returning the results from the old webserver? After you update your HOSTS file, if you restart your browser, then it should forget what it knows about your domain and attempt to resolve to an IP address, starting with your HOSTS file.
If it's still not working, send me a stick mail with the new domain and the IP address, and maybe I'll catch something.
>> If it's configured for multiple domains using "Virtual Aliasing"
Ah, I need to find out what this is, have a chat with the hosting company and figure out if it's something they do or something I have to do. (I've already logged into the Domain Management section of the Site Manager at westhost, added the new domain, and pointed it to relevant sub directory ....but there's obviously something I'm missing)