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.
Related Sites Mode
Although the multiple sites feature was initially implemented with the idea of keeping the sites completely separate, there are some cases where its best if the separate sites could all use the same users and roles. As of version 188.8.131.52, mojoPortal CMS now supports this. The following Web.config/user.config settings are relevant:
<add key="UseRelatedSiteMode" value="false"/>
<add key="RelatedSiteID" value="1"/>
<add key="RelatedSiteModeHideRoleManagerInChildSites" value="true"/>
Setting UseRelatedSiteMode to true will enable this feature. Normally the first site will be the master site and it will have SiteID = 1. If for some reason your master site has a different site id, you can specify it using the RelatedSiteID setting. All the users will be attached to this site id and all the roles and users from this site will be shared across all the other sites. The same roles apply throughout all the sites, so an Administrator can edit anything about any site. It is also possible to assign certain roles permission permission to edit a child site, so they can edit only within that site but they are not administrators of the system, so they have no ability to create roles or change security settings other than page permissions within their site. The setting for assigning the Site Editor Roles only shows up in Site Settings from the master site. You choose the child site from the drop down list and can set its Site Settings. There you will see the setting for Site Editor Roles.
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.
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.
So if you want to enable deleting sites, look for this setting in Web.config:
<add key="AllowDeletingChildSites" value="false" />
and change it to true.