I've got a couple of sites set on my local development atmosphere. From individuals sites I've two sites where I experience horribly slow page load occasions. Horribly slow, like roughly a few minutes. The truth is my computer (mac professional osx 10.6, dual xeon nehalem processors, 6 gb of ddr3 memory) is adequately outfitted and also the other sites load here real quick. I understand it is not a programming problem since the slow sites are fast on their own production servers. Also these websites are simply upright PHP and MySQL stuff, no advanced frameworks or anything. These websites are set up exactly the same way as the rest of the quick sites on my small local machine and just like what I have done on other dev conditions where i've not experienced exactly the same problem, same version of Zend Server CE, PHP, and OSX. This issue is seriously affecting my productivity focusing on these websites. I sincerely hope everyone possess some input :-D
First, determine if utilizing a "standard" TLD is important. Plenty of designers use ".dev" or ".local" as TLD inside their local atmosphere. Sometimes these can result in lengthy timeouts. Change to a typical TLD&mdashpick anyone that will not result in a conflict for you personally&mdashand find out if that can help.
If you are still getting issues, observe that OS X Lion may place DNS servers in front of the local /etc/hosts file when solving names! Try
scutil --dns to determine where
domain : local seems within the sequence.
If "local" not #1 then see: http://www.justincarmony.com/blog/2011/07/27/mac-os-x-lion-etc-hosts-bugs-and-dns-resolution/ for resolution underneath the heading "Solution: DNSMasq". The answer given here&mdashalong with utilizing a standard TLD labored well for me personally.
(I have also seen alternative solutions, e.g., http://clintberry.com/2011/05/wildcard-sub-domains-on-osx-web-development-on-localhost/, but haven't examined them.)