Mac OSX的hosts文件位于/private/etc/hosts。 记得用sudo权限编辑即可。在文件中添加如下内容: xxx.xxx.xxx.xxx (ip地址) abc.com(你的host名称)