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 also hope that these sites can be displayed independently under their respective domain names.AnQiCMS's powerful multi-site management function is designed to address this pain point.It allows users toA 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 multiple program codes, but is based on its efficient Go language architecture and modular design, achievingUnified management and resource sharingThis means that the user only needs to maintain an AnQiCMS instance to manage all affiliated independent sites as if they were managing a folder.This design brings significant advantages: it reduces operational costs, simplifies the upgrade and maintenance process, and ensures the independence and security of data at each site.

The system uses clever configuration to direct requests from different domain names to the same AnQiCMS core service, and then AnQiCMS intelligently distributes content to the corresponding independent sites according to the requested domain.

Implement independent display: Key steps analysis

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

1. Deploy AnQiCMS Core Service

First, deploy the main program of AnQiCMS on the server. Normally, this only requiresAn AnQiCMS application instance. Regardless of 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 subsequent requests for different domain names will go through this port first.

2. Configure web server reverse proxy

This is a critical step to achieve independent display of 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 domains (such aswww.siteA.comandwww.siteB.comAccessing different sites 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), add forwww.siteA.com/www.siteB.comdomain names for each new site.
  • Set up reverse proxy rules:Forward the requests corresponding to these domain names to the internal address and port of the AnQiCMS core service, for examplehttp://127.0.0.1:8001. The web server will receivewww.siteA.comThe request is then forwarded to the AnQiCMS service8001on the port.

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

3. Create a new site in the AnQiCMS backend

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

  • Log in to the main site background:Access the backend administration interface of your AnQiCMS main site (the one initially installed).
  • Enter multi-site management:Find the "Multi-site Management" feature in the left menu of the backend.
  • Add a new site:In the interface for adding new sites, you need to fill in the following key information:
    • Site Name:Used for background identification, convenient for management.
    • Site root directory:This is a very important setting, used to store the independent cache, uploaded files, and other data of the site. Even though the AnQiCMS program code is only deployed once, each site has its ownThe data directory must also be independent and uniqueFor 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 the site, such ashttp://www.siteA.com. AnQiCMS will identify the request based on this domain and display the content of the corresponding site.
    • Admin account password:Set up an independent backend management account and password for this new site.
    • Database name:Similarly, it is recommended to use an independent database name for each separate site, for examplesiteA_com_dbTo ensure data isolation. If your database permissions allow, you can usually choose to 're-use the default database account information' to simplify the configuration.
    • Select the template to use:Select a dedicated template for this site.

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

4. Independence of content and template

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, etc., completely independent.The editing of one site does 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.The AnQiCMS template file conventions (such as/templatethe root directory,config.json/mobile/directories, etc.) also support this flexible customization.

Operation value and advantages

Through AnQiCMS to achieve the independent display of multi-site content under different domain names, bringing multifaceted value to operators:

  • Centralized management, decentralized display:Only one backend is needed to manage all websites, but each website appears completely independent on the front end, improving management efficiency.
  • Resource efficient 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, descriptions, and use 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:An independent data directory and database ensures isolation between site data, enhancing data security.
  • Flexible scalability: With the development of business, new sites can be created at any time to meet the needs of multi-brand, multi-language, and multi-business line development.

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


Frequently Asked Questions (FAQ)

  1. Can an AnQiCMS server handle a large number of independent sites with different domain names?AnQiCMS is developed based on Go language, with the architectural advantages of high concurrency and high performance.Under reasonable server resource allocation, an AnQiCMS instance can stably carry multiple even large independent sites.The multi-site design aims to efficiently utilize resources, through the reverse proxy of the Web server and the domain recognition mechanism of AnQiCMS internally, effectively distribute traffic, and ensure the independent operation and content display of each site.The specific capacity depends on the 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?The content of each independent site is created in the AnQiCMS backend, and it will be allocated an independent "site root directory" and "database name".This means that each site's data (such as articles, images, categories, pages, etc.) is stored in its own database table, and uploaded media files are also stored in separate directories, thereby achieving physical data isolation.In terms of templates, AnQiCMS supports specifying different template theme packages for each site, which are usually stored in/templateUnder the directory, and independently referenced by the site, ensuring that each website has a unique appearance and