Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've had two sites on my local host and have had mysite1.local and mysite2.local in my /etc/hosts file to pointing in my localhost. Now, I moved those sites into my homeserver (Ubuntu, Local network) and made changes to the hosts file, and also in /private/etc/hosts is the same. The files have 644 permissions. mysite1.local mysite2.local

I flushed my dnscache

sudo dscacheutil -flushcache

I rebooted the machine, reset Safari but still no changes.. Still if I try to go either mysite1.local or mysite2.local, it is pointing to localhost!

When I run

dscacheutil -q host -a name mysite1.local

It returns name: mysite1.local ip_address: two times and if I do the same for mysite2.local, it returns name: mysite2.local ip_address: only once.

What could be the problem?

OS is Snow Leopard 10.6.8

share|improve this question
Yes, hosts file is where I made hosts changes! /etc/hosts file permissions are 644. When I ran your command mysite1.local puts name: mysite1.local ip_address: two times and mysite2.local puts name: mysite2.local ip_address: one time.. weird!? Without .local I get nothing?? – Marko Nov 26 '11 at 10:44
No... ? Why you ask? Never heard that command before!? – Marko Nov 26 '11 at 11:21
That would have been another way to set those redirects. I updated your question to include what we know so far — I'll delete my comments. For now, I'm a bit out of ideas. – slhck Nov 26 '11 at 11:31
Okey, thank you sir! :) I could and at the moment are using different local domain to get access to mysites. So new records works just fine not just those what I was using to point localhost... COuld there be some other hosts file/s what system will use? – Marko Nov 26 '11 at 17:54

A great deep-dive into DNS in Snow Leo is here

My best guess is that you have a cached .local domain flat file in /etc/resolver that wasn't refreshed/flushed properly. By the way, are you using the system's apache? Where did you make the local virtual host changes, to point to the corresponding site files? .local is always a troublesome domain to use, as it overlaps with the Bonjour protocol's default/expected namespace, and (as described in the article above,) all resolution goes through the same daemon.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .