iis - 找不到localtest.me的服务器IP地址
问题描述
我试图通过 IIS 设置测试绑定到 localtest.me,但它没有解析到我的本地 IP 地址。我对 localtest.me 的理解是它应该自动解决。在 Chrome 中得到错误消息:
找不到 blog-test.localtest.me 的服务器 IP 地址。
ping blog-test.localtest.me 时出现以下错误:
Ping request could not find host blog-test.localtest.me. Please check the name and try again.
在 IIS 中,我有一个绑定到 blog-test.localtest.me 的站点,其设置如下:
我在网上阅读的所有内容都建议 localtest.me 应该自动解决?是这种情况还是我缺少设置步骤?
解决方案
您只需在本地主机文件中添加此条目,它就会起作用。
在 Windows 机器上 -C:\Windows\System32\drivers\etc\hosts
在 *nix 机器上 -/etc/hosts
推荐阅读
- node.js - NodeJS,使用 Multer 上传多张照片,但最后一张照片覆盖了所有其他照片
- php - 样式表未链接
- css - CSS 范围仅适用于 Angular 中的整个模块
- c# - 如何在 Microsoft bot v4 中从英雄卡中捕获用户回复
- swift - iOS 13 上的 ApplePay 错误“连接到远程警报查看服务失败”
- html - “如何在 HTML 和 CSS 中修复‘css 编辑后按钮不移动’”
- css - 如何使网格区域始终为页面的 100% 宽度?
- python - 使用 Python 在 Azure SQL 上启用 TDE
- hive - 在 Oracle 中是否有与转储函数等效的 Hive?
- c - 无法在 If 语句中检索或存储二维数组位置