简体   繁体   English

访问localhost将在IIS 7.5 Web服务器上显示404。 日志在哪里?

[英]Accessing localhost shows 404 on IIS 7.5 webserver. Where are the logs?

Wanted to access a local website by 想通过以下方式访问本地网站

http://127.0.0.1/
http://localhost/
http://192.x.x.x/  

but the only reply from any browser was: 但任何浏览器的唯一答复是:

HTTP/1.1 404 Not Found
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 03 Oct 2013 09:38:48 GMT
Connection: close
Content-Length: 315

There is nothing in the logs about what was wrong with the request 日志中没有关于请求出了什么问题的信息

  %SystemDrive%\inetpub\logs\LogFiles\W3SVC3
  %SystemDrive%\inetpub\logs\FailedReqLogFiles

To solve the problem and access the website added 'localhost', 127... in IIS bindings for this website. 为了解决该问题并访问该网站,在IIS绑定中为该网站添加了“ localhost”,127...。 Pages are served using these local Urls. 页面是使用这些本地Urls提供的。

Requests arrived to IIS since as soon as defined the bindings requests are served. 因为定义了绑定请求,所以请求到达了IIS。

My question: Is there a log or way to trace what was happening with the request before defined localhost binding in IIS? 我的问题:在IIS中定义localhost绑定之前,是否有日志或方法可以跟踪请求所发生的情况? What is returning the 404? 什么返回404?

You need to enable failed request tracing on the server and on the site and add a tracing rule to capture 404 requests. 您需要在服务器和站点上启用失败的请求跟踪,并添加跟踪规则以捕获404请求。 That will tell you exactly what the issues is 这将准确告诉您问题所在

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM