How to ensure that each AnQiCMS site's data is independent when deploying multiple sites on the same server?

Calendar 👁️ 59

In today's digital age, efficiently managing multiple websites has become a core need for many businesses and individual operators.AnQiCMS (AnQiCMS) is an enterprise-level content management system based on the Go language, providing us with an excellent solution with its high performance, ease of use, and multi-site support.How to ensure that each site's data is completely independent and not interfere with each other when you need to deploy multiple AnQiCMS sites on the same server, it is a crucial issue in operation and maintenance.As an experienced website operations expert, I will delve into this point with you.

In the design philosophy of AnQiCMS, multi-site management is not just about stacking content together, but aims to provide each site with an independent and secure data environment.This data independence is the foundation for brand differentiation, accurate content operation, and information security protection.Whether you need to establish sub-brand websites for different product lines or provide independent CMS services for multiple customers, understanding and practicing data independent deployment will be the key to success.

The cornerstone of data independence: the core three elements

Ensure that the data of each AnQiCMS site is independent, and we need to pay attention to the following three core elements, which are like the "exclusive safe" and "exclusive channel" of each site, ensuring that information is not confused:

  1. Independent database:This is the most fundamental guarantee of data isolation. Each AnQiCMS site should connect to its own dedicated database.This means that even though they run on the same database server, each site has an independent database name, table structure, and storage space.In this way, the content, users, and configuration data of a site will be completely isolated from the data of another site, eliminating the risk of data confusion and incorrect operations from the source.
  2. Independent file system storage:In addition to the structured data in the database, each site also generates a large number of unstructured files such as images, videos, attachments, cache files, and configurations such asconfig.json) logs, etc. Store these files in separate directories under the root of each independent site, which can effectively avoid file conflicts, permission confusion, and facilitate backup, recovery, or migration for individual sites later on.
  3. An independent application instance and port (or logical isolation):Deploying multiple sites means that there will be multiple "AnQiCMS service" running on the server.Each AnQiCMS application instance needs to listen on a unique port to ensure that traffic is accurately directed to the corresponding site.Even in the AnQiCMS built-in multi-site mode, although there may be only one physical application process, it also creates an independent workspace and data context for each site through logical isolation.

The path of practice: two deployment strategies

After understanding the core elements of data independence, let's take a look at how to achieve it in practice through two main strategies:

Strategy one: Utilize the built-in multi-site management feature of AnQiCMS (efficient integration)

This is a deployment method recommended by AnQiCMS, which is powerful and especially suitable for scenarios where multiple sites need to be managed through a unified backend interface.In this mode, you only need to deploy one AnQiCMS application instance and create and manage multiple front-end sites through its management backend.

  1. Deploy a basic AnQiCMS instance:First, deploy an AnQiCMS master instance on your server according to the official AnQiCMS guide (for example, through Docker, 1Panel, or Baota panel).This instance will default to listening on a port (such as 8001) and connecting to an initial database.
  2. Add a new site in the AnQiCMS backend:Log in to the backend management interface of this main instance, find the 'Multi-site Management' feature. Here, you can easily click 'Add New Site'.
    • Site Name:Name a site name that is easy to identify.
    • Site root directory:This is a key item. You need to specify a new site withindependent and not repetitivephysical path, for example/app/dev_anqicms_com(in a Docker environment, it is usually with/app/The directory starts and uses the domain to replace periods with underscores). AnQiCMS will store the cache, uploaded files, templates, and other files for the new site in this directory, ensuring the independence of the file level.
    • Database name:It is equally important. Set up one for the new siteUniqueFor exampledev_anqicms_com. AnQiCMS will store all the content and configuration data of the new site in this independent database.Although it will reuse your main instance's database connection information (such as database server address, username, password), the data itself is completely isolated in different database instances.
    • Administrator account/password:Set up an independent backend login credential for the new site
    • Website address:Enter the domain name of the new site, which needs to be pre-resolved to your server IP.
  3. Configure reverse proxy:After deploying multiple sites, external users need to access them through different domain names.As only one AnQiCMS application instance is running, you need to configure Nginx, Apache, or the reverse proxy function built into the panel to route different domain requests to the same AnQiCMS instance's listening port.
    • For example, your main sitewww.site1.comand the new sitewww.site2.comwill be directed through reverse proxy tohttps://en.anqicms.com(or the port that the AnQiCMS instance is actually listening on).After receiving a request, AnQiCMS will automatically identify which site it is based on the domain name and load the corresponding independent data and files.

The benefits of this method are centralized management, relatively lower resource consumption (only one AnQiCMS application process), but it can effectively utilize database and file system isolation to achieve data independence.

Strategy two: Deploy multiple AnQiCMS applications independently (highly isolated and flexible configuration)

If you追求极致的隔离性, or need to run different versions of AnQiCMS on different sites, or if your server resources are abundant, then deploying an independent AnQiCMS application instance for each site is a better choice.

  1. Deploy AnQiCMS application multiple times:For each planned site deployment, install and run an AnQiCMS application independently.
    • Independent package/Docker container:Each site has its own AnQiCMS binary file copy or an independent Docker container.
    • Independent port configuration:Each application instance in itsconfig.jsonfile needs to configure aUniquelistening port (for example, the first site uses 8001, the second uses 8002, and so on).
    • An independent database connection:Each AnQiCMS instance'sconfig.jsonshould be configured to connect to itsdedicated databaseThis means that each instance not only connects to different database names but can also use different database user credentials (if higher permission isolation is needed). *

Related articles

After the AnQiCMS program upgrade, if the backend interface does not change, how should I handle it?

After you upgrade AnQiCMS, you eagerly open the background, only to find that the interface is still the same, without any change?This is indeed a confusing scene. As an expert who has been deeply involved in website operations for many years, I can confidently tell you that this is a fairly common phenomenon, not a problem with AnQiCMS itself, and it usually only requires a few simple steps to solve it easily.AnQiCMS is known for its efficiency and simplicity, even the 'illusion' after the program upgrade is often due to some common operational details.We know that AnQiCMS is developed in Go language

2025-11-06

How can AnQiCMS achieve automated content operation and maintenance through scheduled tasks?

As an experienced website operation expert, I know the importance of efficiency and fine operation in the increasingly fierce digital content competition.AnQiCMS (AnQi Content Management System) as an enterprise-level CMS developed based on the Go language, with its powerful feature set, especially in terms of automated operations, really catches one's eye.Today, let's delve into how AnQiCMS cleverly uses scheduled tasks to make content operation and maintenance more intelligent and efficient.

2025-11-06

How to quickly update website content or materials through content collection and batch import features?

As an experienced website operations expert, I know that content is the lifeline of a website, and how to efficiently and continuously inject fresh blood into the website is a challenge that every operator needs to face.Today, let us delve into the two powerful functions of AnQiCMS (AnQiCMS) - content collection and batch import, and see how they become the 'accelerator' for your website content updates.

2025-11-06

What template codes can be edited online in the AnQiCMS backend template editing feature?

As an experienced website operation expert, I know that a successful website cannot do without flexible and varied design and efficient content presentation.The background template editing function of AnQiCMS is specifically designed to meet this core need, giving operators a great degree of freedom, allowing you to directly refine the 'front door' of the website in the background without the cumbersome process of local development and uploading, greatly improving work efficiency. So, what backend template editing features of AnQiCMS support us in modifying template code online?

2025-11-06

What types of data does the 'Update Cache' feature on AnQiCMS backend mainly clean up?

As an experienced website operations expert, I am well aware of the importance of 'caching' for website performance and data real-time accuracy.In the daily operation of AnQiCMS (AnQi CMS), the background "update cache" function seems simple, but it actually plays a core role, ensuring the timely update of our website content and smooth operation of the system.Then, what types of data does this function mainly clean up?Next, I will explain it to you in detail.

2025-11-06

Which operating systems does AnQiCMS support for installation and deployment?

AnQiCMS: Cross-platform deployment, building a secure and efficient website content management system As an experienced website operations expert, I know that the core value of a CMS system is not only in its powerful functions, but also in its flexible deployment and convenient operations.AnQiCMS is a product that performs well in this regard.

2025-11-06

What is the first-time installation and deployment process of AnQiCMS on a Linux server?

In the digital wave, an efficient and stable content management system (CMS) is the foundation for the success of corporate and personal website operations.AnQiCMS (AnQiCMS), this lightweight system developed based on the Go language boasts excellent performance, flexible customization capabilities, and deep SEO-friendliness, and is gradually becoming the preferred choice for many small and medium-sized enterprises and content operation teams.It is not only easy to deploy and efficient in operation, but also can effectively resist many security threats, safeguarding the website.If you are preparing to deploy AnQiCMS on your Linux server

2025-11-06

What are the specific recommended steps for installing AnQiCMS using the Baota panel?

Dear reader, hello! As an experienced website operations expert, I am honored to provide you with a detailed explanation of the installation secrets of AnQiCMS (AnQiCMS).AnQi CMS is an enterprise-level content management system developed based on the Go language, with its high performance, high security, and flexible customization features, it is becoming the preferred choice for more and more small and medium-sized enterprises and content operation teams.It is not only easy to deploy and run at high speed, but also effectively avoids many common website security issues, while providing powerful content management, SEO optimization, and multi-site support features

2025-11-06