多虚拟目录

Community Server can support more than one site on a single installation via a feature called "Virtualization".

To setup a second site you will need the ability to execute a SQL statement directly against your database. In most cases this will be via Microsoft's Query Analyzer (SQL 2000) or SQL Management Studio (SQL 2005). However, so web hosting providers will use their own custom tools.

To enable virtualization, you will need to execute the following statement:

exec cs_System_CreateCommunity 'newWebSite.com', 'user_set_key', 'admin@email.com', 'admin_username',  'admin_password', 0, 1

The parameter 'user_set_key' requires a very important decision. Any communities in the same database with matching 'user_set_key' will share the same users. If you want your new community to have its own users and roles, then add a unique value in this parameter. However, if you want to share users across multiple communities, then you will need to enter an existing value known as the ApplicationName.

If you do not know your existing sites ApplicationName, you can execute the following query:
Select SiteUrl, ApplicationName FROM cs_SiteSettings s1, cs_Sites s2 where s1.SettingsID = s2.SiteID

Once you have your database setup, there is just one more step. By default, Community Server ships with virtualization disabled. To enable virtualization, you will need to open your CommunityServer.config file and fine the enableVirtualization attribute and change its value to "true"

posted @ 2007-05-28 10:02  烈马狂生  阅读(196)  评论(0编辑  收藏  举报