网站未在Windows 10计算机上的IIS 10中运行 [英] website does not run in IIS 10 on Windows 10 machine

查看:53
本文介绍了网站未在Windows 10计算机上的IIS 10中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过几篇与此类似的帖子,但找不到任何解决我问题的答案.

I've seen a couple of posts that are similar to this but I haven't been able to find any answers for my problem.

我只是想在IIS中建立一个网站.我在Windows 10计算机上,当我调出关于Internet信息服务(IIS)管理器"时,它说版本是10.0.1.7763.1.我知道IIS正在工作,因为如果在浏览器URL地址栏中键入 localhost ,我将获得默认页面,该页面显示IIS正在运行.我创建了一个名为 index.html 的简单文件,其中仅显示"hello there"在里面.当我双击该文件时,我的默认浏览器打开并显示"hello there"所以我知道此文件可在我的浏览器中正常工作.

I'm just trying to set up a website in IIS. I'm on a Windows 10 machine and when I bring up the "About Internet Information Services (IIS) Manager" it says that the version is 10.0.1.7763.1. I know IIS is working because if I type localhost in my browser url address bar I get the default webpage that says IIS is running. I created a simple file called index.html that just says "hello there" in it. When I double click on this file my default browser opens up and displays "hello there" so I know that this file works in my browser.

这是我要在IIS中创建网站的步骤:

Here's the steps I'm going through to create the website in IIS:

  1. 右键单击站点"在连接窗格中.
  2. 点击添加网站"
  3. 在站点名称:"中框,输入"BlahBlahWebsite.com"
  4. 在物理路径:"中框输入index.html的物理路径
  5. 在主机名:"中框,输入"BlahBlahWebsite.com"
  6. 点击确定"

这是我单击确定"之前的样子:

Here's what it looks like before I click "OK":

网站配置屏幕截图

现在,根据我在IIS管理器中了解到的信息,我应该可以单击浏览网站"下的链接,在动作"中IIS管理器右侧的窗格中,但是当我单击在*:80(http)上浏览BlahBlahWebsite.com"链接时,而不是显示index.html,它带我了解了互联网上搜索引擎的结果.我了解这个错误吗?如何设置它,以便可以浏览到"BlahBlahWebsite"中的index.html.目录?我应该在网址栏中输入其他内容吗?在此先感谢您的任何帮助.

Now from what I understand in IIS Manager I should be able to click the link under "Browse Website" in the "Actions" pane on the right side of IIS Manager but when I click the link that says "Browse BlahBlahWebsite.com on *:80(http)" instead of bringing up the index.html it takes me to the results of a search engine out on the internet. Am I understanding this wrong? How do I set it up so that I can browse to the index.html in my "BlahBlahWebsite" directory? Should I be entering something different in the url address bar? Any help would be greatly appreciated, thanks in advance.

推荐答案

感谢@LexLi将我带入正确的道路.我发现

Thanks to @LexLi for putting me on the right path. I found this article that talks about configuring the localhost settings in the hosts file. I put an entry in my hosts file like this:

127.0.0.1    BlahBlahWebSite.com

并保存了主机文件.然后,我可以在浏览器的URL地址栏中输入 BlahBlahWebSite.com 或单击IIS管理器中*:80(http)链接上的 Browse BlahBlahWebsite.com并同时执行两项操作我的 index.html 页面上.

and saved the hosts file. I could then enter BlahBlahWebSite.com in my browser url address bar or click on the Browse BlahBlahWebsite.com on *:80(http) link in IIS manager and both actions brought up my index.html page.

要注意的另一件事是,通过编辑主机文件,使您可以设置多个网站,就像上面列出的那样,您只需建立一个新网站,然后在主机文件中输入一个新条目即可.因此,如果除了 BlahBlahWebSite.com 之外,我还想创建一个名为 DifferentWebSite.com 的新网站,我将按照上面概述的步骤创建 DifferentWebSite.com 在IIS管理器中,然后编辑我的主机文件,使其看起来像这样:

Another thing to note is that by editing your hosts file like this allows you to set up multiple websites, you just set up a new website as I listed above and then make a new entry in your hosts file. So, if I wanted to create a new website named DifferentWebSite.com in addition to BlahBlahWebSite.com I would go through the steps I outlined above to create DifferentWebSite.com in IIS Manager and then edit my hosts file so it would look like this:

 127.0.0.1    BlahBlahWebSite.com
 127.0.0.1    DifferentWebSite.com

现在,我可以在浏览器的网址栏中输入 BlahBlahWebSite.com DifferentWebSite.com 或单击浏览网站"IIS中操作"窗格中的链接",它将在相应的网站目录中显示我的 index.html 页.

and now I can enter either BlahBlahWebSite.com or DifferentWebSite.com in my browser url address bar or click the "Browse Website" link in the Actions pane in IIS and it will display my index.html page in the respective website directories.

希望这对其他人有帮助.

Hope this helps anyone else.

这篇关于网站未在Windows 10计算机上的IIS 10中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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