简体   繁体   English

无法使用绑定访问IIS托管的网站

[英]Cannot access IIS hosted website using bindings

I've been messing around a bit with IIS and it's taken up a good few hours of trouble shooting now. 我一直在弄乱IIS,现在花了好几个小时解决问题。 I'm using windows server 2008 R2 with IIS 7 我正在使用Windows Server 2008 R2和IIS 7

I can access the site locally using localhost or the IP address no problem 我可以使用localhost或IP地址在本地访问站点,没有问题

if I use the server name I can also access the default web site by going to www.servername.net - IIS homepage 如果使用服务器名称,我还可以通过访问www.servername.net-IIS主页来访问默认网站。

i've copied my "NewSite" folder into wwwroot which then gives me external access to this new site via 我已经将“ NewSite”文件夹复制到wwwroot中,然后我可以通过以下方式从外部访问该新站点

www.servername.net/NewSite www.servername.net/NewSite

and local access via localhost/newsite 和本地访问通过本地主机/新站点

However locally I have no access via just NewSite 但是在本地我只能通过NewSite访问

and externally I cannot get access unless I use the servername.net/NewSite and put it inside that directory 在外部,除非使用servername.net/NewSite并将其放在该目录中,否则我将无法访问

Detailed Error Information:

Module
   IIS Web Core 

Notification
   MapRequestHandler 

Handler
   StaticFile 

Error Code
   0x80070002 

Requested URL
   http://servername:80/newsite/ 

Physical Path
   C:\inetpub\wwwroot\newsite\ 

Logon Method
   Anonymous 

Logon User
   Anonymous 

This is the error I get when I try to access the site locally but externally I just get a normal 404 这是我尝试在本地访问该网站时遇到的错误,但是在外部,我只收到正常的404错误

Here's my binding: 这是我的绑定:

在此处输入图片说明

My thoughts are that this is a DNS problem? 我的想法是这是DNS问题吗? but I don't even know where to start with that. 但我什至不知道从哪里开始。 I don't know what else to add so ask anything and I'll add more details 我不知道还要添加什么,所以问什么,我将添加更多详细信息

Having NewSite for your HostName in the binding means that the binding will only be looking for HostName requests that match NewSite . NewSite为您的HostName NewSite意味着绑定将仅在寻找与NewSite匹配的HostName请求。

You will want to change HostName to Blank to accept traffic for anything hitting that IP/Port combination, or if you have multiple sites, set it to the actual Domain Name that will be sent in the host header request such as yoursite.com . 您将需要将HostName更改为Blank来接受任何达到该IP /端口组合的流量,或者如果您有多个站点,请将其设置为将在主机标头请求中发送的实际域名,例如yoursite.com

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

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