简体   繁体   English

如何在IIS绑定中为网站部署主机名?

[英]how to deploy host name for the website in iis bindings?

I have problem with giving host name to a website in iis bindings option.When I browse the website by binding the website with empty host name,it can be seen in the browser. 我在iis绑定选项中为网站提供主机名时遇到问题。当我通过使用空主机名绑定网站来浏览网站时,可以在浏览器中看到它。

But when i write the host name for the same website by assigning it in the binding option it gives an error " Server not found " 但是,当我通过在绑定选项中分配它来为同一网站写主机名时,会出现错误“ 找不到服务器

I also edited the hosts file in ' C:\\Windows\\System32\\drivers\\etc ". 我还在“ C:\\Windows\\System32\\drivers\\etc ”中编辑了主机文件。

So please help me to assign host name to the website.I have stucked with this problem for three days 因此,请帮助我为网站分配主机名。我已经坚持了三天

If you edited the host file, the line that you added should look something like: 如果编辑了主机文件,则添加的行应类似于:

127.0.0.1 [Tab] www.hostname.com 127.0.0.1 [制表符] www.hostname.com

Also in IIS when you do "Edit Bindings" you will have to put the host name in the correct field. 同样在IIS中,当您执行“编辑绑定”时,必须将主机名放在正确的字段中。 Then do Start -> Run -> Type "iisreset" to restart your IIS and then do a Start -> Run -> Type "cmd" and try pinging www.hostname.com and make sure that the response comes from your local machine. 然后执行开始->运行->键入“ iisreset”以重新启动IIS,然后执行开始->运行->键入“ cmd”并尝试ping www.hostname.com并确保响应来自本地计算机。

Also make sure that you are actually typing the "www" in your web browser. 还要确保您实际上是在网络浏览器中键入“ www”。

Hope this helps! 希望这可以帮助!

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

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