我应该把我的ASP.NET的网站在wwwroot文件夹? [英] Should I put my ASP.NET websites in the wwwroot folder?

查看:165
本文介绍了我应该把我的ASP.NET的网站在wwwroot文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有许多网站在一台机器上的IIS下运行。

I have a number of websites that run under IIS on a single machine.

我应该把这些网站的的C内部:\\的Inetpub \\ wwwroot的\\文件夹或C里面?:\\的Inetpub \\文件夹

Should I put these websites inside of the C:\inetpub\wwwroot\ folder or inside the C:\inetpub\ folder?

例如。


  • C:\\的Inetpub \\ wwwroot的\\ WEBSITE1 \\

  • C:\\的Inetpub \\ wwwroot的\\ WEBSITE2 \\


  • C:\\的Inetpub \\ WEBSITE1 \\

  • C:\\的Inetpub \\网站2 \\

是否有任一或其他建议位置的任何优点/缺点(我只有这台机器上的C盘)?

Are there any pros/cons for either or another recommended location (I only have a C drive on this machine)?

我不知道是否有一个正确的答案,而是要遵循最佳实践(如果有)。

I am not sure whether there is a "correct" answer to this, but want to follow best practice if there is one.

非常感谢,
乔纳森

Many thanks, Jonathan

推荐答案

转到第二条路线。

wwwroot的只是有作为默认网站服务器的容器。如果从IIS中删除默认的网站,那么你可以放心地在这个目录中删除。无论如何,你的网站有没有关系默认的,所以他们应该在自己的文件夹下的Inetpub。

wwwroot is simply there as the container for the default website for the server. If you delete the default website from within IIS, then you can safely remove this directory. Regardless, your sites have nothing to do with the default, so they should be in their own folders under inetpub.

这是说,我们有时有多个相同的服务器上的网站的类型。例如DEV和QA。在这种情况下,我想它结构为:

That said, we sometimes have multiple "types" of sites on the same server. For example DEV and QA. In this case I would structure it as:

C:\\的Inetpub \\ dev的\\ site1的结果
C:\\的Inetpub \\ dev的\\站点2

c:\inetpub\dev\site1
c:\inetpub\dev\site2

C:\\的Inetpub \\ QA \\ site1的结果
C:\\的Inetpub \\ QA \\站点2

c:\inetpub\qa\site1
c:\inetpub\qa\site2

这篇关于我应该把我的ASP.NET的网站在wwwroot文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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