在一个Web应用程序上具有多个域的IIS [英] IIS with multiple domains on one single web application

查看:112
本文介绍了在一个Web应用程序上具有多个域的IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.net 在 IIS上构建 Web应用程序。概念如下。

I am building a Web Application on IIS with asp.net. The concept is as follows.

客户购买域名,然后从20-30个准备好的模板中选择一个模板。

A customer Buys a Domain and then Selects a Template from 20-30 ready Templates.

现在该应用程序位于 www.mywebappblabla.com/usersites

用户域 www.myowndomain.com 指向 www.mywebappblabla.com/usersites 然后我们从数据库中跟踪网址,然后网站与用户的预定义模板一起显示。

The users domain is www.myowndomain.com which points to www.mywebappblabla.com/usersites and then we track url from the database and then website is shown along with the predefines template from the user.

因此,如果有其他用户拥有域 www.myotherdomain.com ,那将再次指向 www.mywebappblabla.com/usersites 然后根据数据库中存储的数据向他显示不同的模板和不同的页面内容。

So if there is other user with domain www.myotherdomain.com which will again point to www.mywebappblabla.com/usersites and then different template and different page content is shown to him depending on stored data in database.

我的问题是这个系统可能会被3000-5000个用户使用。这是正确的approch吗?或者我们应该为每个站点创建一个单独的文件夹并分隔Db?

My question is this system may be used by say 3000 -5000 users. So is this the right approch? Or should we make a seperate folder and separate Db for each site?

我们希望在很短的时间内配置系统。例如。用户发送带有内容的word文件和要使用的模板。我们应该能够在2-3小时内使网站生效。

We want to configure the system in very less time. eg. User sends word file with content and the template to use. We should be able to make the site live in 2-3 hrs.

approch应该是什么。它会影响网站性能吗?

What should be the approch. Will it affect the site performance.

谢谢和问候

VIpin

推荐答案

大多数网站都使用子域方法来做这种事情;例如,我的网站可能位于joshuashanemartin.host.com,您的网站可能位于yourusername.host.com(Wordpress,Google协作平台,其他人都使用此方法)。

Most Websites use a subdomain approach for this kind of thing; for instance, my "Website" might be located at joshuashanemartin.host.com and yours might be located at yourusername.host.com (Wordpress, Google Sites, and others all use this approach).

基本上,您可以使用包含以下表格的单个数据库:

Basically, you might use a single database with the following tables:


  • customers

  • 网站

  • 网页

一位客户可以拥有多个网站,每个网站都有很多页面。您可以在站点中甚至在页面中定义模板。每个页面对象都有一个内容属性,它是HTML或某种标记语言(就像我写回答时StackOverflow使用的那样)。

One customer can have multiple sites, each of which has many pages. You define the template in the site, or even in the page. Each "page" object has a "content" attribute, which is either HTML or some kind of markup language (like what StackOverflow uses when I write my answer).

是否或者不采用子域方法,如customername.host.com,或者您的方法,如www.host.com/usersites/customername由您决定。最后,您只需从单个数据库加载不同的内容,并使用URL来确定您要加载的数据。

Whether or not you take the subdomain approach, like customername.host.com, or your approach, like www.host.com/usersites/customername is up to you. In the end, you'll just be loading different content from a single database and using the URL to determine who's data you're loading.

这篇关于在一个Web应用程序上具有多个域的IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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