Working with /etc/hosts on Mac
hosts file entries allows you to create DNS aliases which can be very handy for web development. If your on a Mac, you will notice that it has the
/etc/hosts file just like other unix os's.
One problem I kept running into however was that OS X was caching my host entries. So if I added a line like this:
And then I changed it to this:
dev.example.com host will still resolve to the old IP address.
Flushing the DNS Cache on Mac
If you are running Mac OSX Leopard (10.5) or greater, you use the
dscacheutil command to flush the dns cache, eg:
If you are using an earlier version of Mac OSX, for example 10.4, then you need to use the
- Amazon Search Dashboard Widget for Tiger - May 6, 2005
- Web Services Problems with ColdFusion 8 on a Mac - August 16, 2007
- Anyone used MacFuse? - January 13, 2007
- Howto Backup your Mac incrementally over SSH - March 10, 2006
- USB Phone for Skype on Mac - March 3, 2006
- Why is my cron.daily script not running?
- Announcing FuseGuard Version 3
- CFSummit 2017
- Java Unlimited Strength Crypto Policy for Java 9 or 1.8.0_151
- Java 9 Security Enhancements
- Upcoming CFML Conferences in April 2017
- CFSummit 2016 Slides
- Securing Legacy CFML - dev.Objective() 2016 Slides