简体   繁体   English

IIS上网站的混乱部署

[英]Confusion Deployment of website on the IIS

I am a noob. 我是菜鸟 I am learning to develop and deploy small websites on the IIS server. 我正在学习在IIS服务器上开发和部署小型网站。 Now i have the following confusion : 现在我有以下困惑:

I think procedure to 'add' a website to the IIS server starts from adding a new virtual directory or adding a new website in the inetmgr. 我认为将网站“添加”到IIS服务器的过程从添加新的虚拟目录或在inetmgr中添加新的网站开始。 Please correct me if i am wrong. 如果我错了,请纠正我。 I also think that once we have done this .. it is mandatory to add the source of the project to the inetpub/wwwroot folder. 我还认为,一旦完成此操作,就必须将项目源添加到inetpub / wwwroot文件夹中。 Am i correct ? 我对么 ? Is it always necessary to do so ? 是否总是有必要这样做? I am worried because in that case how can we run multiple websites ? 我很担心,因为在那种情况下,我们如何经营多个网站? Also .. say i have added a virtual directory to the inetmgr ... now what do i do to run my website ... i am trying but getting "Directory Listing Disabled" written on the browser once i type http:\\localhost....\\Default.aspx 另外..说我已经向inetmgr添加了虚拟目录...现在我该怎么做才能运行我的网站...我正在尝试但是一旦我输入http:\\ localhost就会在浏览器上写“ Directory Listing Disabled”。 ... \\ Default.aspx

No, the source does not need to be added to the Inetpub folder. 不,不需要将源添加到Inetpub文件夹中。 You can simply add a new virtual directory pointing to the location of the site. 您只需添加一个指向站点位置的新虚拟目录即可。 (Make sure the selected location is the folder containing your Default.aspx page) (确保所选位置是包含Default.aspx页的文件夹)

If all other settings are correct, you should be able to hit the site at 如果所有其他设置均正确,则您应该可以访问以下网站

http://machineName/virtualDirectoryName/ http:// machineName / virtualDirectoryName /

For this address to work, make sure you are allowing default documents, you may have to add "Default.aspx" to the list depending on your IIS version. 为了使该地址起作用,请确保您允许使用默认文档,根据您的IIS版本,您可能必须在列表中添加“ Default.aspx”。

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

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