Setting the Hostname in IIS Bindings Breaks Website

こ雲淡風輕ζ 提交于 2019-11-29 07:34:12

问题


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

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.

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?

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.


回答1:


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.

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!




回答2:


You must use EXTERNAL DNS not Internal DNS to make it visible across the internet. Change the DNS pointer at your registrar or whatever you are using for external DNS propagation.



来源:https://stackoverflow.com/questions/1204032/setting-the-hostname-in-iis-bindings-breaks-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!