When using AnQiCMS to build and manage websites, users often face the need to create independent sites for different brands, businesses, or regions, and they hope that these sites can be displayed independently under their respective domain names.AnQiCMS A powerful multi-site management feature, designed to solve this pain point.A set of AnQiCMS core programBased on this, easily create and operate multiple content-independent, domain-independent websites.

The core concept of AnQiCMS multi-site management

AnQiCMS's multi-site management is not simply a copy of the program code, but is based on its efficient Go language architecture and modular design, achievingUnified management and resource sharing.This means that the user only needs to maintain one AnQiCMS instance and can manage all affiliated independent sites as if they were managing a 'folder'.This design brings significant advantages: it reduces operation and maintenance costs, simplifies the upgrade and maintenance process, while ensuring the independence and security of data at each site.

The system cleverly configures to direct different domain requests to the same AnQiCMS core service, and then AnQiCMS intelligently distributes the content to the corresponding independent sites based on the requested domain.

Implement independent display: Key Steps Analysis

To make the multi-site content of AnQiCMS display independently under different domain names, it mainly involves the following core steps:

1. Deploy AnQiCMS Core Service

Firstly, deploy the main program of AnQiCMS on the server. In most cases, this only requiresAnQiCMS Application Instance。No matter whether you are using the Baota panel, 1Panel's Docker deployment method, or running directly in the command line environment, AnQiCMS will provide services on a fixed port, such as the default one.8001Port. This port is the shared "entry" for all sub-sites, and all requests with different domain names will go through this port first.

2. Configure Web server reverse proxy

This is a key step to implement independent display for different domain names. Since the AnQiCMS core service only listens to one internal port (such as 8001), and we hope that users can access through different domain names (such aswww.siteA.comandwww.siteB.com)Visit different sites, which requires a web server (such as Nginx or Apache) to act as an 'intermediary' to handle external requests.

You need to configure reverse proxy for each independent site on the web server:

  • Create a site for each new domain:In your Web server management interface (such as Baota panel, 1Panel), addwww.siteA.com/www.siteB.comdomain names for each new site.
  • Set up reverse proxy rules:Translate these domain name corresponding requests, reverse proxy to the internal address and port of AnQiCMS core service, for examplehttp://127.0.0.1:8001. The web server will receivewww.siteA.comAn English request, then forward it to the AnQiCMS service8001port.

Through such configuration, the web server can accurately route the request to the same backend service of AnQiCMS according to the domain name accessed by the user.

3. In AnQiCMS backend, create a new site

After completing the reverse proxy configuration, the next step is to create these independent sites in the AnQiCMS background management system in English:

  • Login to the main site admin panel:Access the backend management interface of your AnQiCMS main site (the site installed first).
  • Enter multi-site management:Find the "multi-site management" feature in the left menu of the background.
  • Add a new site:In the interface for adding a new site, you need to fill in the following key information:
    • Site Name:Used for background recognition, convenient for management.
    • Site root directory:This is a very important setting, used to store independent cache, uploaded files, and other data for this site. Even if only one copy of AnQiCMS's program code is deployed, each site hasThe data directory must also be independent and unique.for example/app/siteA_com. The system will isolate the data of different sites based on this directory.
    • Website address:Enter the independent domain name corresponding to this site, such ashttp://www.siteA.com。AnQiCMS will identify requests based on this domain and display the corresponding site content.
    • Administrator account password:Set an independent admin account and password for this new site.
    • Database name:Similarly, it is recommended to use an independent database name for each independent site, for examplesiteA_com_dbTo ensure complete data isolation. If your database permissions allow, you can usually choose to “reuse default database account information” to simplify configuration.
    • Select the template you want to use:Select a dedicated template for this site.

After completing these settings, click confirm, and the new independent site will be successfully created, and can be accessed through its dedicated domain.

4. Content and template independence

AnQiCMS provides highly independent content and template management for each site in multi-site mode:

  • Content independent: Each site created in the background has all content data such as articles, products, pages, categories, tags, and so on completely independent.An edit to one site will not affect another, ensuring the personalization and focus of the content.
  • Template independence:Each site can choose and enable its own template. You can/templatecreate multiple different template packages underdefault/siteA_theme/siteB_theme),and specify the corresponding template for each site in the background.This means that each site can have a unique design style and user experience without worrying about interference./templatethe root directory,config.json/mobile/directories, etc.) also support this flexible customization.

Operational Value and Advantages

Achieve independent display of multi-site content under different domain names through AnQiCMS, bringing multi-faceted value to operators:

  • Centralized management, decentralized display:Manage all websites with just one backend, but each website appears completely independent on the frontend, improving management efficiency.
  • Efficient resource utilization:Avoided the repeated installation and maintenance of multiple AnQiCMS programs, saving server resources and labor costs.
  • SEO Optimization:Each site can be configured with independent SEO titles, keywords, and descriptions, utilizing tools such as pseudo-static rules, 301 redirects, etc. for personalized optimization, better serving the target audience under different domain names.
  • Data isolation and security:Independent data directories and databases ensure the isolation of data between sites, enhancing data security.
  • Flexible scalability:With business development, new sites can be created at any time to meet the development needs of multiple brands, languages, and business lines.

AnQiCMS through a simple and efficient architecture truly allows users to easily manage the complexity of multi-site operations, and to invest more energy in content creation and business growth.


Common Questions (FAQ)

  1. Can an AnQiCMS server handle a large number of independent sites with different domain names?AnQiCMS Based on Go language development, with the advantages of high concurrency and high performance architecture.Under reasonable server resource allocation, an AnQiCMS instance can reliably support multiple and even a large number of independent sites.The multi-site design aims to efficiently utilize resources, distribute traffic effectively through the reverse proxy of the web server and the domain recognition mechanism of AnQiCMS internally, ensuring the independent operation and content display of each site.The specific load-bearing capacity depends on server hardware, site content complexity, and concurrent access volume, but it is usually more efficient than deploying multiple independent CMS instances.

  2. How are the content and templates of each independent site kept separate?Each independent site's content is assigned a separate "site root directory" and "database name" when created in the AnQiCMS backend.This means that the data (such as articles, images, categories, pages, etc.) for each site is stored in its own database table, and the uploaded media files are also stored in independent directories, thus achieving physical isolation of data./templateDirectory under, and independently referenced by the site, ensuring that each website has a unique appearance and