首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到本地主机(404) iis

问找不到本地主机(404) iis
EN

Stack Overflow用户
提问于 2014-01-21 02:43:50
回答 3查看 16.4K关注 0票数 2

我的计算机上的DNS本地主机有几个问题。

当我在visual studio或任何浏览器中查找localhost时,某个指令正在重定向我所有的资源管理器,包括visual studio 127.0.0.1以外的其他地方。

这样的事情会发生在哪里呢?我最近把我的hosts文件改成了指向其他地方的localhost,但是后来它不起作用了,所以我把它换回来了,所以这不可能是问题。

代码语言:javascript
复制
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# 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

我也已经卸载并安装了IIS,所以不是iis重定向不正确的问题。

由于此问题,我无法运行Visual Studio解决方案。

我试过pining 127.0.0.1,它响应了,我也试过localhost,它也可以工作,但是当我在浏览器上输入localhost时,它会重定向到一个"404“页面。

EN

回答 3

Stack Overflow用户

发布于 2014-12-31 03:34:05

确保IIS实际配置为监听127.0.0.1 (也许您之前删除了绑定?)

netsh http show iplisten

IP addresses present in the IP listen list: 127.0.0.1

您可以添加额外的IP,如下所示:

netsh http add iplisten ipaddress=10.0.0.10

票数 3
EN

Stack Overflow用户

发布于 2018-08-08 08:57:51

我也遇到了这个问题,结果是IIS中默认Web站点的绑定出现了问题。我将"Host Name“指定为服务器的域名,这意味着外部访问工作正常,但尝试通过localhost访问任何IIS页面时都会返回浏览器404错误。

票数 2
EN

Stack Overflow用户

发布于 2020-03-26 03:11:43

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21241709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档