bigbigxiao

今天配置host时,发现不起作用

通过百度在博客园找到一位园友的帖子解决了问题

 

1. windows 中hosts文件位置(win10):

  C:\Windows\System32\drivers\etc\hosts

 

2. 修改方式

....
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost

127.0.0.1    www.mysite.com

3. 应用

  在不用重启系统情况下,应用修改后的hosts文件,打开cmd,输入如下命令:

  3.1  查看DNS缓存内容

ipconfig /displaydns

  3.2 删除DNS缓存内容,从而达到更新DNS目的

ipconfig /flushdns

4. 访问定制域名测试

 

 转载:https://www.cnblogs.com/springlight/p/7102044.html

 

分类:

技术点:

相关文章:

  • 2021-08-05
  • 2021-08-05
  • 2021-10-19
  • 2021-12-06
  • 2021-12-16
  • 2021-10-01
  • 2021-10-01
  • 2021-10-01
猜你喜欢
  • 2021-11-29
  • 2021-12-06
  • 2021-12-19
  • 2021-11-29
  • 2021-11-29
  • 2021-08-05
相关资源
相似解决方案