简体   繁体   English

如何为特定网站nam配置IIS

[英]how to configure IIS for a specific website nam

Hi everyone, 嗨,大家好,

I have configured my web application using IIS7. 我已经使用IIS7配置了Web应用程序。 It is running fine for http:// localhost/, but I need to give some website name like http://myexamsystem.com/ instead of "localhost". 对于http:// localhost /,它运行良好,但是我需要提供一些网站名称,例如http://myexamsystem.com/,而不是“ localhost”。 I have tried all the possible ways from IIS7, but I am not getting the result. 我已经尝试了IIS7的所有可能方法,但没有得到结果。 Steps I did upto now: Step 1: Right Click on "Sites". 我到目前为止所做的步骤:步骤1:右键单击“站点”。

Step 2: Selected "Add Website" option. 第2步:选择“添加网站”选项。

Step3:In "Add web site" dialog box: 步骤3:在“添加网站”对话框中:

Site Name:"myexamsystem", Application Pool: "DefaultAppPool" Physical path: "desktop\\myproject folder" Binding 站点名称:“ myexamsystem”,应用程序池:“ DefaultAppPool”物理路径:“ desktop \\ myproject文件夹”

Type:HTTP, Ip address "All Unassigned", Port:80 类型:HTTP,IP地址“所有未分配”,端口:80

Host Name: "myexamsystem.com" 主机名:“ myexamsystem.com”

OK

Error Messege: 错误消息:

This page can't be displayed 此页面无法显示

•Make sure the web address http://myexamsystem.com/ is correct.` •确保网址http://myexamsystem.com/是正确的。

If this is just for debugging / local development, then you'll need to add an entry in your HOSTS files. 如果这仅用于调试/本地开发,则需要在HOSTS文件中添加一个条目。 This is located: 位于:

c:\windows\system32\drivers\etc\hosts

It can be edited in notepad (if you have administrator rights on your machine). 可以在记事本中对其进行编辑(如果您具有计算机的管理员权限)。 You just add the following entry: 您只需添加以下条目:

127.0.0.1       myexamsystem.com

Note that this will only work locally. 请注意,这仅在本地有效。 If you want it public, then you'll need to buy the domain name and point it to an external IP address. 如果要公开,则需要购买域名并将其指向外部IP地址。

Update 更新资料

Just seen your comment about it needing to run on your local network. 刚刚看到您对它需要在本地网络上运行的评论。 A quick way is to add your internal network IP address to each machine's HOSTS files. 一种快速的方法是将内部网络IP地址添加到每台计算机的HOSTS文件中。 You can find out your internal IP address by typing ipconfig into the command prompt. 您可以通过在命令提示符下键入ipconfig来查找内部IP地址。 Then add it to the HOST file of the other machines in the same way as I descibed above, except use your internal IP in their HOST file rather than 127.0.0.1. 然后以与我上面描述的相同的方式将其添加到其他计算机的HOST文件中,除了在其HOST文件而不是127.0.0.1中使用内部IP。

If you don't want to manually add them to each computer, then as far as I know, you'll need a DNS server. 如果您不想手动将它们添加到每台计算机,那么据我所知,您将需要一台DNS服务器。

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

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