Mac配置本地服务器,并通过手机访问本地html
2020-05-14 本文已影响0人
芭芭拉
一:启动本地apache服务
• 重启 Apache:sudo apachectl start
• 停止 Apache:sudo apachectl stop
• 重启 Apache:sudo apachectl restart
二:commond+shift+g

将本地的html放到该目录下,也可以创建子目录

三:将本地ip作为localhost放到hosts文件中

hosts文件没有权限去写,需要创建副本,然后将后缀删除,然后进行替换,替换后手机连接代理就可以访问了。


