[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Richard Brown wrote: > >> I am setting up a new web server and transferring sites over. In order >> to test the sites are set up correctly I am editing my etc hosts file >> and doint this: >> 213.146.173.175 cregy.co.uk >> I was hoping this would then go to the new site to allow setting up. >> But it doesn't. Any idea why please. By the way I'm using a Mac. > > Sorry guys the answer was easy enough - reboot computer to clear dns > cache - unless of course there is a command line way of clearing the > cache! "rndc flush" assuming the DNS server is local and running BIND, otherwise it depends on the cache in use. Most other DNS cache services can just be restarted to clear them. However name resolution for websites on most Linux boxes defaults to "hosts" file then "dns" $ grep "^hosts:" /etc/nsswitch.conf hosts: files dns So editing the hosts file should be enough. These days many browsers cache DNS responses (for reasons unclear to me, mostly I think to be irritating and so browsers can consume vast amounts of memory whilst the local DNS cache consumes memory caching the same information, and the local recursive resolver consumes memory caching it as well if it is separate), so one often has to restart the browser after editing the hosts file (sigh). Of course Mac OSX may do something different, Apple, like Microsoft, have a long history of doing weird stuff where DNS is concerned to no particular advantage to anyone. Rebooting to change one name, well let us merely say it is a good job we don't have to do it with the entire Internet ;) -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html