In today's digital environment, many businesses and individuals need to manage multiple websites, whether it's different brand sites, product sub-sites, or multi-language versions for different markets.Dealing with such needs, a system that can efficiently handle content across multiple sites is particularly important.The multi-site management function of AnqiCMS is exactly for this, allowing you to easily manage multiple websites in one backend, while ensuring that each site can independently and correctly display its exclusive content on the frontend page.

English version: AnqiCMS Multisite Management Core Advantages

Firstly, let's understand the charm of AnqiCMS multi-site management.It is most significant advantage lies in 'Unified management, content independent'.Imagine that you no longer need to build a brand new CMS system for each new website and do not have to repeat the basic configuration.AnqiCMS provides a centralized management platform where you can create, edit, and maintain all associated sites in the same backend.This not only saves your time and effort greatly, but also makes resource sharing and data integration more convenient.

Here, 'content independence' is the foundation to ensure that each site has its own unique brand voice, product display, or service information.It means that when visitors visit one of your sub-sites, they see content that is specifically designed and optimized for that site, rather than a mix of information from other sites.

The first step to build an independent site: configure server environment

To make the multi-site feature of AnqiCMS work, we first need to make some configurations on the server side.English translation: Usually, we would use reverse proxy technology to make different domain names point to the same AnqiCMS instance.This means you do not need to install multiple copies of AnqiCMS on the server, one program is enough to support all sites.

For example, with a common panel like Baota, you will set a separate domain for each new site, and then point these domains through reverse proxy to the port where AnqiCMS is running (default is 8001).When visitors access through different domain names, the reverse proxy will forward the request correctly to AnqiCMS, and AnqiCMS will identify the corresponding site according to the domain name.

In this process, each site also needs an independent site root directory (for example)/www/wwwroot/anqicms.com/publicor under the Docker environment/app/dev_anqicms.comEnglish),used to store the cache, static files, and other independent data of the site, and points to AnqiCMS'spublicdirectory. This ensures the independence of files for each site.

Create and configure an independent site in the AnqiCMS backend

The server environment is ready, and the next step is the operation of the AnqiCMS backend.Log in to the admin backend of your main site, in the multi-site management feature, you will find the option to 'Add New Site'.

  • Site Name:Name used for backend management and identification.
  • Site root directory:Specify the independent storage path of the new site on the server, which is an important identifier that distinguishes it from other sites.
  • Website address:The external access domain name of the new site.
  • Administrator account and password:Set independent backend management credentials for new site to ensure permission separation.
  • Database name:Specify a brand new database for the new site.This is the core of implementing content independence, where the data (articles, categories, images, etc.) of each site will be stored in its own database without interference.If you are deploying on the same server using Docker or similar methods, you can usually choose to reuse the default database account information, but the database name must be independent.
  • Select the template you want to use:This is the key to controlling the appearance of the front-end page. You can choose a completely different template for a new site, or reuse an existing template and make personalized modifications.

Complete these configurations and the new independent site will be created successfully. You can directly enter the management interface of the new site by clicking the "Visit Backend" button in the list and start publishing content.

The key to displaying independent content on the front-end page: understanding template mechanisms and data calls

How to correctly display the independent content of each site on the front page in AnqiCMS? This is mainly due to its flexible template mechanism and intelligent data call method.

  1. An independent template and themeEach site can have its own dedicated template theme.When you create a new site in the background, the template you choose determines the overall visual style and layout of the site.Different sites can choose completely different templates, thus presenting entirely different appearances and user experiences on the front end.index.html/detail.html) as well as static resources (CSS, JS, images) are stored in their respective template directories, ensuring visual independence.

  2. Exclusive data streamSince each site is configured with an independent database, they have their own articles, products, categories, single pages, tags, and all other content data.This means that when you publish a news article on the new site backend, it will only display on this site and will not appear on other sites.This physical level data isolation is the fundamental guarantee of content independence.

  3. Using AnqiCMS tags to call exclusive site contentIn the AnqiCMS template, we use various built-in tags to call data. For example,{% archiveList %}used to obtain the article list,{% categoryList %}Used to get category information,{% pageDetail %}Used to display single-page content.These tags will automatically identify which site the current visitor is accessing by default, and will automatically extract the corresponding content from the database of that site for display.

    For example, when visitors visitbrandA.comthe article list page of{% archiveList archives %}the tags will automatically pull articles frombrandA.comthe corresponding database. Similarly, when visitors visitproductB.comthe product detail page of{% archiveDetail with name="Title" %}The label will be displayedproductB.comThe title of the product.

    This design greatly simplifies the development and maintenance of templates. You do not need to manually specify the data source in each template tag; the system will automatically complete the matching.

    Of course, AnqiCMS also provides high flexibility. If you have special requirements, such as displaying the latest news of the main site on a sub-site, or calling data of other language versions on a multilingual site, you can explicitly use template tags.siteIdParameter to implement cross-site data calls.

    For example, if you want to display the latest 5 articles of the site with ID 2 on the current site:

    {% archiveList archives with type="list" limit="5" siteId="2" %}
        {% for item in archives %}
            <li><a href="{{ item.Link }}">{{ item.Title }}</a></li>
        {% endfor %}
    {% endarchiveList %}
    

    Similarly,systemLabels can retrieve the system configurations of different sites,tdkLabels can retrieve the SEO meta information of different sites,contactTags can obtain contact information from different sites etc., all of which support being obtained throughsiteIdspecified.

  4. Independent SEO and URL structure optimizationEach independent site has its own pseudo-static rules, 301 redirects, Sitemap, Robots.txt, as well as the homepage TDK (Title, Description, Keywords) settings.This means that you can perform fine-grained SEO optimization for the target audience and keyword strategies of each site, ensuring that each site can perform well in search engines and further strengthen the independence of its content.

Seamless operation and continuous expansion

AnqiCMS's multi-site management feature makes your operation efficient and organized.Whether it is to create a new brand website, expand a regional market, or create a temporary page for a specific event, it can be easily achieved on one platform.Content, users, permissions, SEO and other aspects are well isolated and controlled, enabling each site to operate independently and stably.

Summary

Through the multi-site management feature of AnqiCMS, you can manage multiple websites that have independent content, independent appearance, and independent operation strategies with a single system architecture.From the reverse proxy configuration on the server, to the independent site creation in the background, and finally to the front-end page calling exclusive content through smart tags, the entire process is clear and efficient.This makes AnqiCMS a powerful and flexible content management tool, especially suitable for various users who need to manage multiple online presences but also want to maintain independent content.


Common Questions (FAQ)

1. How is the content of AnqiCMS's multi-sites truly independent?Content independence is mainly achieved by each site havingIndependent databaseTo implement.When creating a new site in the AnqiCMS backend, you need to specify a brand new database name for it.Each site's articles, products, categories, pages, and all other data are stored in their respective databases, ensuring no interference and physical isolation of content.