在 IIS 绑定中断网站中设置主机名 [英] Setting the Hostname in IIS Bindings Breaks Website

查看:24
本文介绍了在 IIS 绑定中断网站中设置主机名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装了 Windows Server 2008 VPS,但在安装 IIS7 时遇到问题.

I just got a Windows Server 2008 VPS and I'm having trouble getting IIS7 setup.

我在 IIS 中创建了一个包含路径、IP 地址和主机名(如www.nameofsite.com")的新网站,然后单击确定".当我浏览到该站点时,它会在浏览器中显示http://www.nameofsite.com"... 没什么... IE 无法显示此网页.

I created a new website in IIS with the path, ip address, and hostname (like 'www.nameofsite.com') and click OK. When I browse to the site it pulls up "http://www.nameofsite.com" in the browser and... nothing... IE cannot display this webpage.

如果我清除绑定中的主机名并单击 [Browse],它会正常工作(我会转到 http://10.10.2.92 - 计算机的 IP).所以输入主机名会破坏网站.

If I blank out the hostname in the bindings and click [Browse] it works fine (it takes me to http://10.10.2.92 - the computer's ip). So entering the hostname breaks the website.

对我缺少的东西有什么想法吗?我可能没有运行的服务或我缺少的角色?

Any ideas on what I'm missing? Services I might not have running or roles I'm missing?

最初没有在 VPS 上安装服务器角色,所以我安装了 IIS、DHCP、DNS 和应用程序服务器......太过分了,但我不确定要安装什么.

No server roles were initially installed on the VPS so I installed IIS, DHCP, DNS, and Application Server... overkill, but I wasn't sure what to install.

推荐答案

首先它必须在 DNS 或客户端机器主机文件中.要对此进行测试,您可以将主机名添加到服务器主机文件中.

First it has to be in DNS or the client machines hosts file. To test this you can add the hostname to the servers hosts file.

转到开始 -> 运行并键入驱动程序"更改到要编辑主机文件的 etc 目录.其中的条目就像本地 DNS.他们只在本地机器上工作!

Go to start -> run and type "drivers" change to the etc directory you want to edit the hosts file. The entries in it are like a local DNS. They only work on the local machine!

这篇关于在 IIS 绑定中断网站中设置主机名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆