As an experienced website operator who deeply understands the operation of AnQiCMS, I know the importance of efficient management of multiple sites for corporate brand building and content operation.The multi-site management function of AnQiCMS is specifically designed to meet this need, allowing you to manage multiple independently operated websites under a single system architecture, whether it is a brand sub-site, a multi-language site, or a content branch, you can easily handle it.

Now, let's delve into the specific operation process of the AnQiCMS multi-site management feature.

The core concept of AnQiCMS multi-site management

AnQiCMS multi-site management is not just a simple copy of multiple systems, but rather, under a simple and efficient system architecture, it creates, configures, and manages independent content for multiple sites through a unified backend.This means, you can significantly reduce repetitive work, optimize resource allocation, and achieve data integration and sharing across sites.This is undoubtedly a key advantage for enterprises with multiple brands or those that require refined operation in different content fields to improve efficiency and reduce costs.

Each site has an independent database and file storage space in the system (usually in their respective site root directory), ensuring data isolation and security, and can also be passed through the template level.siteIdLimited data calls and integration are realized with parameters, providing possibilities for flexible content strategies.

The technical foundation for deploying multi-site: reverse proxy configuration

To implement the multi-site management of AnQiCMS, the front-end traffic routing is an indispensable part.This is usually done by configuring the reverse proxy of the web server to direct different domain names to the same AnQiCMS application instance.

First, you need to add a reverse proxy rule for each new site in the Baota panel.Log in to the Baota panel, go to the "WebsiteIn the pop-up interface, enter the domain name of the new site as the "main domain" and specify the port where the AnQiCMS application runs as the "proxy address".http://127.0.0.1:8001Ensure that the domain names of each new site are correctly resolved to your server IP.

Next, configure the runtime directory and pseudo-static rules of the web server (such as Nginx or Apache) for the newly created site.For each new site added, click the 'Settings' button of the site in the 'Website' list of the Baota panel.publicsuch as/www/wwwroot/yourdomain.com/public.

Then, based on the type of web server you are using, configure the pseudo-static rules. For Nginx, you need to add the following rules to the pseudo-static configuration of the site:

location @AnqiCMS {
    proxy_pass http://127.0.0.1:8001;
    proxy_set_header   Host             $host;
    proxy_set_header   X-Real-IP        $remote_addr;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
}
error_page 404 =200  @AnqiCMS;
location / {
   try_files $uri $uri/index.html @AnqiCMS;
}

For Apache, you usually specify the reverse proxy target URL directly in the site settings.http://127.0.0.1:8001And without manually writing complex rewrite rules. After completing the configuration, be sure to save and restart the web server to make the changes take effect.

Add and manage new sites on AnQiCMS backend

After the reverse proxy is properly configured, you can formally add a new site to the AnQiCMS backend.Log in to the backend management interface of your main AnQiCMS site, find and click the 'Multi-site Management' feature in the left menu.

In the multi-site management interface, you will see a 'Add New Site' button, click it to open the new site configuration form. Here, you need to carefully fill in the following key information:

  • Site Name:Specify a recognizable name for your new site to distinguish it in the backend.
  • Site root directory:This is a very important setting, used to independently store the cache, static files, and other data of a new site. It is recommended to use/app/Start by following a domain name after replacing the dot (.), for example, if the new site domain isdev.anqicms.comthen the root directory can be/app/dev_anqicms_comMake sure that the root directory name for each site is unique.
  • Website address:Enter the full access address of the new site, for examplehttp://dev.anqicms.com.
  • Admin account password:Set an independent admin account and password for the new site.
  • Database name:This is also to achieve data isolation, to specify an independent database for the new site. It is usually named with a domain name replacing the dot, for exampledev_anqicms_com.
  • Database information reuse: If you are installing using Docker or other methods, and the AnQiCMS application has full database management permissions, you can choose to "reuse the default database account information", so you do not need to fill in the username and password of the database separately.If you wish to store the data of the new site on a different database server or use different database credentials, you must uncheck and fill in the details accordingly.
  • Select the template to use:Select a default template from the existing templates in the system.

After all information is filled in, click the "OK" button to complete the creation of the new site.Once created successfully, the new site can be accessed directly via the previously configured domain.You can click the 'Access Backend' button from the multi-site management list to quickly navigate to the management interface of the new site and start its independent content operations.

Content and data isolation across multiple sites

By the above operation, each site created in AnQiCMS will have:

  • Independent data storage:All content data such as articles, products, categories, and single pages are stored in their respective databases without interference.
  • Independent file system:The site root directory settings ensure that each site's uploaded files, caches, and other resources are independent.
  • Independent backend management:Each site has an independent administrator account and password, implementing permission separation.
  • Flexible template selection:Each site can choose different templates to realize personalized front-end display.

At the same time, AnQiCMS's template tag system also supportssiteIdParameters mean that in advanced template development, you can optionally call or display content from other sites, while meeting isolation requirements, it also provides a technical interface for cross-site content linkage.

Through this entire process, the multi-site management function of AnQiCMS has brought unprecedented flexibility and efficiency to your content operation team, allowing you to easily deal with diversified website operation needs on a unified platform.


Frequently Asked Questions (FAQ)

  1. What is the difference between AnQiCMS multi-site management and installing multiple independent AnQiCMS applications on the same server?The AnQiCMS multi-site management feature allows you toAn AnQiCMS application instanceCreate and manage multiple independent sites that share the same program code but have their own independent databases, file storage, and backends