AnQiCMS (AnQiCMS) provides an efficient and flexible solution for operators with multiple brands, sub-sites, or content branches, with its powerful multi-site management function.It allows you to easily create, manage, and display multiple independently operated websites under the same core system, greatly enhancing the efficiency of content operations.

Understanding the multi-site architecture of AnQiCMS

The elegance of AnQiCMS lies in the fact that you only need to install one core system, and you can easily create and manage multiple independent websites without needing to redeploy the program for each site. This architecture brings significant advantages:

First, it has implementedUnified management. You can overview the operation status of all sites through a main backend entrance, and delve into the management interface of a specific site when needed. Secondly, this modereduced redundant workloadsFor example, operations such as system upgrades and security maintenance only need to be performed on the core system and can benefit all sub-sites. Again, each site can havean independent content system and management interfaceEnsure the focus of content operations and data isolation while also supportingResource integration and data sharing Possibility, providing a foundation for more complex operational strategies.

Deployment and configuration of multi-site: from server to CMS backend

To allow multiple sites to coexist and operate independently in AnQiCMS, it usually requires two core configurations: domain and reverse proxy settings on the server level, as well as site registration in the AnQiCMS backend.

1. Basic configuration on the server level

No matter whether you deploy through Docker on management panels like 1Panel, aaPanel, or directly configure Nginx or Apache on the server, the core idea is to use reverse proxy technology to direct different domain names to the same running port of your AnQiCMS (usually the default is8001)

For example, if you have two domain namessiteA.comandsiteB.comYou need to set up reverse proxy rules for these domain names in the Web server configuration on the server (such as Nginx), pointing to the running port of AnQiCMS. The Nginx configuration is roughly as follows:

# siteA.com 的配置
server {
    listen 80;
    server_name siteA.com www.siteA.com;

    location / {
        proxy_pass http://127.0.0.1:8001; # 指向AnQiCMS的端口
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

# siteB.com 的配置
server {
    listen 80;
    server_name siteB.com www.siteB.com;

    location / {
        proxy_pass http://127.0.0.1:8001; # 同样指向AnQiCMS的端口
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

After configuration, please make sure that your domain name is correctly resolved to the server IP.

2. Site registration on AnQiCMS backend

After completing the server configuration, the next step is to register a new site on the AnQiCMS backend. You need to log in to the main site backend of the originally installed AnQiCMS (usually主域名/system/),Find and enter the 'Multi-site Management' feature in the left menu.

Here, click 'Add New Site', and the system will require you to fill in the details of the new site.

  • Site Name:Used to distinguish between different sites, and can be named according to actual circumstances.
  • Site root directory:This is a very critical setting, used to independently store the cache, logs, uploaded files, and other data of the new site, ensuring data isolation. It must be/app/(If it is a Docker environment) or/www/wwwroot/Starting with, and adding a directory name based on the domain that is not repeated, for example/app/site_a_comor/www/wwwroot/site_a_com.
  • Website address:The complete URL of the new site, for examplehttp://siteA.com.
  • Admin account password:Set an independent admin account and password for the new site.
  • Database name:It is necessary to specify a unique database name for the new site to avoid confusion with existing site data, for examplesite_a_com_db.
  • Database information reuse: If your AnQiCMS is installed using Docker and you have full database management permissions, you can usually choose to 'Reuse the default database account information' to avoid the step of re-entering the database credentials.
  • Select the template to use:For a new