Hosting Multiple Sites on One Installation
mojoPortal content management system can easily host multiple sites using 1 web installation and 1 database.
Each site is completely independent, having separate users, roles, content, and skinning. The first site is considered the master site and all additional sites are considered child sites, but this is only in terms of global administration. The master site can manage the Site Settings and configure which features are available for child sites and is the site used to create the child sites, but no content, and by default no users, are shared across the sites. Child sites can also manage their own Site Settings but cannot install features or manage other child sites.
One of the primary advantages of hosting multiple sites using mojoPortal CMS is that all the sites run in a single application domain and therefore consume less server resources than if you setup separate IIS or Apache web sites. Each web site gets its own application instance and this carries some overhead in terms of server resources.
The information in this section is no longer a problem with .NET 4 and higher.
As is often the case, the very thing that is an advantage noted above comes with a corresponding limitation. Since the multiple sites are actually one site in terms of application boundaries, certain things like ASP.NET themes are cached globally and are therefore shared across sites.
In mojoPortal CMS most of the issues related to this have been mitigated because we generally only use the theme.skin files only to set css classes instead of setting specific style properties. This works great because different mojoPortal "skins" use the same css class names but each can style that class differently so there is no conflict at all.
Another good reason for only assigning css class names in themes and not setting any other specific style properties in the theme is because when you do set style properties in the theme, ASP.NET renders those properties inline in the html markup and this increases the amount of markup (and therefore page size) unneccessarily which hurts performance. Keeping all the style properties in css is the most efficient way to keep the markup of the rendered page lean.
If your site is using .NET 3.5 and your hosting provider enforces a Medium trust policy, hosting multiple sites on 1 web installation will not work correctly due to problems mentioned at the bottom of the article Understanding the theme.skin file, but you can still use 1 database as long as you have separate physical web installations at the same host. Medium Trust hosting under .NET 4 or higher should work fine.
How Many Sites Can I Host In A Single Installation
Generally the only limits are based on the available server resources vs the aggregate traffic of all the sites and the load produced by the traffic.
The only limit you may bump up against in terms of mojoPortal configuration is based on the mojoSiteMap.config file located in the root of the web, it must have an entry for each site id, as of the current version (184.108.40.206) I have it configured for up to 500 sites which is probably more than most people will ever need (and most likely far more than could be hosted from a shared hosting account) but it can be configured for more by adding more more entries. So if you need 501 sites you just copy this:
<add name="mojosite500" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
and add another one below it as 501 like this:
<add name="mojosite501" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
and so on for as many sites as you care to try and host from a single installation.
There are 2 ways to establish additional sites with mojoPortal, using different host names for each site, or using virtual folders to define the additional sites.
For more information about using Host names to define sites see:
Multiple Sites Based on Host Names
For more information about using Folder names to define sites see:
Multiple Sites Based on Folder Names
Assigning Features To Sites
By default, new sites only have one feature available, the HTML Content Feature. To assign additional features to your sites:
- Login to the Master site (the first one installed) as an administrator.
- Click Administration > Site List.
- Select the site to which you want to assign features.
- Click the Features tab and you should see a screen like this:
- Select the features you want to assign and click the right arrow (->) button at the top.
- Click the Save button.
You can't delete the root site, but it is possible to delete secondary child sites. Its disabled by default to prevent accidental deleting a site. Once you delete it there is no way to get it back, so it seems wise in most cases to keep it disabled and just enable it when you need to delete sites.
To enable deleting sites, set this to 'true' in your user.config:
<add key="AllowDeletingChildSites" value="false" />