I had this issue a while back. I fixed it by making up a testing domain [i use clientname.loc and make a new one for each project] and put it in your hosts file [C:\Windows\System32\Drivers\etc\hosts].
#existing hosts file entries
127.0.0.1 clientname.loc
Alternatively you could use 127.0.0.1 instead of localhost as apparently that works to.