As an expert in CMS content management and website operations, I deeply understand the value of efficient multi-site management.The multi-site management function of AnQi CMS is designed to meet this core requirement, allowing multiple independent websites to be managed and operated on the same server with a streamlined and efficient architecture.This has greatly improved operational efficiency and effectively integrated resources.

Understanding the multi-site architecture of AnQi CMS

English CMS does not require the installation of a separate program for each website. Its multi-site management core lies in, througha single core application instanceTo bear and manage multiple independent logic sites.This means that you only need to run one security CMS process on the server, usually listening on an internal port (such as 8001).When an external request accesses through a different domain name, the front-end web server of the server (such as Nginx or Apache) will forward these requests to this single security CMS application instance through reverse proxy.Auto CMS then identifies the corresponding logical site based on the requested domain from its internal configuration and database, and provides the corresponding website content.

The advantages of this architecture are evident:

  • Resource efficient utilizationThe translation of auto is English.
  • Unified centralized managementAll site management functions are centralized in one backend, simplifying daily maintenance and operation processes.
  • Simplified upgrade maintenance:Core program upgrade requires only one operation, which benefits all managed sites, greatly reducing maintenance workload.
  • Balancing data sharing and isolationAlthough the underlying system is the same, each logical site has its own independent database and file storage space, ensuring data isolation and facilitating cross-site data sharing and resource integration when needed.

The operation process of installing and managing multiple sites on a server in English

To implement multi-site management of the CMS on a single server, the following is a detailed operation process based on panel tools (such as Baota Panel, 1Panel), which is the most commonly used method by operation personnel:

First, ensure that an instance of the security CMS core has been successfully installed and running on your server. This instance is typically bound to your main domain or a test domain via a reverse proxy and runs on a default port (for example,8001).

First step: Create a domain entry for the new site in the server panel

For each new site you want to add, you need to create an independent "website" or "reverse proxy" entry for it in the server management panel (such as Baota panel or 1Panel).

For example, using Baota panel, you can create a new "PHP project" or "reverse proxy site", even if your AnQiCMS is a Go language application.The key is that you need to bind an independent domain to the new site and set the reverse proxy target address to the internal port of the AnQiCMS core instance you have already run.127.0.0.1:8001Then, the reverse proxy target of the new site should also be set tohttp://127.0.0.1:8001.

In this step, you will specify the domain name of the new site, for examplenewsite.com.Although Baota may require you to set a "root directory", this directory is mainly used for panel display and Nginx/Apache configuration. We will specify the actual site data storage directory in the Baota CMS background later.

第二步:Configure the Nginx/Apache reverse proxy rules for the new site

After creating the domain entry, it is necessary to configure the reverse proxy rules of Nginx or Apache for the new site to ensure that requests from the new domain can be correctly forwarded to the core application of the AnQi CMS.

For Nginx, you need to change the 'working directory' in the configuration of the new site./public(If using Baota panel, this is usually a separate setting item), then add the reverse proxy rule as shown below:

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;
}

These rules instruct Nginx: first try to find the requested static file (try_files $uri $uri/index.html), if not found, then forward the request to the internal proxy named@AnqiCMS, and@AnqiCMSwill forward the requestproxy_passListening to AnQi CMS8001port.

After configuration is complete, please make sure to save and restart the Nginx or Apache service to take effect.

Third step: Add a new site in the Anqi CMS backend

After completing the domain and reverse proxy configuration on the server side, you need to log in to the backend management interface of the Anqi CMS main site, and use its built-in 'Multi-site Management' feature to create and configure new logical sites.

Navigate to the "Multi-site Management" menu in the background, then click the "Add New Site" button. In the pop-up configuration interface, you will fill in the detailed information of the new site:

  • Site Name:Specify a recognizable name for the new site, which is only used for background management.
  • Site Root Directory:This option is crucial. You need to specify a new site.a unique directory path on the server.This directory will be used to store the cache files and uploaded images for the new site