简体   繁体   English

我应该如何在IIS中组织Web应用程序?

[英]How should I organize web apps in IIS?

Say I make a web app for my main page and publish it to wwwroot (assuming this is the default website). 假设我为我的主页制作了一个Web应用程序,然后将其发布到wwwroot(假设这是默认网站)。 Do I publish other web apps by nesting them within wwwroot. 是否通过将其他Web应用程序嵌套在wwwroot中来发布它们。 Something like wwwroot/webapp1 for example? 例如类似wwwroot / webapp1的东西? This seems somewhat messy to me, so I'm not quite sure if it's the correct way of doing it. 对我来说这似乎有些混乱,所以我不确定这是否是正确的方法。 Therefore, I'm wondering how the rest of you would organize this? 因此,我想知道你们其余的人如何组织这件事?

I generally do not put applications inside of other applications when using IIS. 使用IIS时,通常不会将应用程序放在其他应用程序内部。 This is because I do MVC applications that can take over all the routing and it'd be really annoying to host applications in the folders inside. 这是因为我做的MVC应用程序可以接管所有路由,并且将应用程序托管在内部文件夹中确实很烦人。 Even if you are not doing MVC applications, I would still avoid doing it, and instead make multiple websites that listen on different host headers or ports. 即使您不使用MVC应用程序,我仍然会避免这样做,而是创建多个侦听不同主机头或端口的网站。 If you need to have applications nested like that I would use a reverse proxy like HAProxy and setup routing there instead. 如果您需要像这样嵌套应用程序,则可以使用HAProxy之类的反向代理,并在那里设置路由。

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

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