How to deploy multiple CMS instances on a single AnQiCMS server?

Calendar 👁️ 54

As an experienced AnQiCMS website operator, I am well aware of the importance of efficiently and flexibly managing multiple websites under the growing business needs.This means that we may need to deploy multiple independent CMS instances on a single server to meet different project requirements or for higher isolation requirements.AnQiCMS is an enterprise-level content management system based on Go language, its lightweight and efficient features make it very suitable for such deployment scenarios.

This article will discuss in detail how to deploy multiple CMS instances on a single AnQiCMS server, which is different from the built-in multi-site management feature of AnQiCMS.Built-in multi-site management refers to an AnQiCMS application managing multiple logical sites, while deploying multiple CMS instances means running multiple independent AnQiCMS application processes on the same server.

Understanding the multi-instance and multi-site concepts of AnQiCMS

Before deep deployment, we need to clarify the two "multi-site" capabilities provided by AnQiCMS.

Firstly, AnQiCMSBuilt-in multi-site management function. This is one of the core advantages of AnQiCMS, allowing you to manage multiple websites under multiple domain names within a single AnQiCMS application instance through backend configuration and an independent database.The advantage of this model is that you only need to maintain a set of AnQiCMS program code, with updates and management relatively centralized, suitable for those who want centralized management but content isolation.In this mode, you just need to add a new site in the "Multi-site Management" of AnQiCMS, and specify an independent root directory for each site (used to store their respective caches, uploaded files, etc.) and database.The reverse proxy will direct requests from different domain names to the same port that the AnQiCMS process is listening on.

What comes next is also the focus of this article, that isDeploy multiple independent AnQiCMS instancesThis means you will run multiple AnQiCMS application processes on the same server.Each process is a complete, independent CMS, with its own program files, configuration files, database, and listening ports.This method provides higher isolation and independence, suitable for completely unrelated projects, or projects that require different AnQiCMS versions and independent configurations.

Preparation for deploying multiple independent AnQiCMS instances

Deploy multiple AnQiCMS instances on your server requires that you meet some basic conditions.You will need a Linux server (or a Windows/macOS environment for testing), and ensure that you have enough system resources such as CPU, memory, and storage space to support the operation of multiple CMS instances.It is recommended to use Baota Panel, 1Panel, or other similar server management tools to simplify operations, or deploy directly through the command line.

Each AnQiCMS instance requires an independent MySQL database.Before starting the deployment, please ensure that your MySQL service is installed and running, and prepare to create separate databases and users for each CMS instance.

Deploy multiple AnQiCMS independent instances step by step

We will take the Linux server environment as an example to introduce how to deploy multiple independent AnQiCMS instances.

Prepare an independent file directory for each instance

You need to prepare a set of independent program files for each AnQiCMS instance. First, unzip the downloaded AnQiCMS installation package to a directory on the server, for example/www/wwwroot/anqicms_site1Then, copy this complete AnQiCMS directory to another location, for example/www/wwwroot/anqicms_site2As the program directory of the second CMS instance. Similarly, create a dedicated program file directory for each independent CMS instance.

Configure a unique listening port for each instance.

AnQiCMS listens to port 8001 by default. However, each independent AnQiCMS instance on the same server must use a unique port to run to avoid port conflicts.Enter the root directory of each AnQiCMS instance, find and editconfig.jsonfile. In it, you need toportThe value of the field should be changed to different port numbers. For example, the first instance uses 8001, the second instance uses 8002, the third instance uses 8003, and so on.

Rename AnQiCMS executable file (optional but recommended)

To facilitate management and distinguish between processes of different instances, you can choose to rename the directories under each instance.anqicmsto an executable file. For example, set/www/wwwroot/anqicms_site1/anqicmsRenamed toanqicms_site1_app, will/www/wwwroot/anqicms_site2/anqicmsRenamed toanqicms_site2_appThis will help you clearly identify each AnQiCMS instance when viewing system processes.

Create independent start and stop scripts.

Each independent AnQiCMS instance requires its own start (start.sh) and stop (stop.sh) Script, these scripts should point to the program directories of each instance and the renamed executable files.These scripts will be responsible for checking the running status of the corresponding instance and starting or stopping it if necessary.The script content should be adjusted according to the actual directory path and executable file name.

For example, foranqicms_site2_appinstance, itsstart.shin the fileBINPATHshould point to/www/wwwroot/anqicms_site2,BINNAMEandgrepthe name in the command should also be changed toanqicms_site2_app.

Configure system process guardian

To ensure that each AnQiCMS instance can automatically start after the server restarts and recover automatically in case of exceptions, you need to configure process guardians for each instance.

If you are using Baota panel, you can add a Go project for each instance by going to “Website” -> “Go Project” (or “Other Project”) feature. When configuring, the project executable file points to the executable file of the corresponding instance (such as/www/wwwroot/anqicms_site2/anqicms_site2_app),the project port should be filled in with the instance inconfig.jsonthe unique port configured in (for example8002),the execution command is also the path of the executable file, and check the “Boot at startup” option.

If deployed via command line, you can set up a crontab task for each instance to check and start the corresponding AnQiCMS process every minute to ensure it runs continuously.

# 编辑crontab任务
crontab -e

# 为每个AnQiCMS实例添加一行类似下面的任务,请根据实际路径和名称修改
# 假设 anqicms_site2 的程序目录是 /www/wwwroot/anqicms_site2,可执行文件是 anqicms_site2_app
*/1 * * * * /www/wwwroot/anqicms_site2/start.sh

Configure Web Server Reverse Proxy

Each AnQiCMS instance needs to provide services through a domain.You need to configure a reverse proxy for each domain on your web server (such as Nginx or Apache), forwarding external requests to the unique port that the corresponding AnQiCMS instance is listening on.

For example, forsite2.comThis domain, you can configure Nginx reverse proxy to forward requests tohttp://127.0.0.1:8002.

`nginx server {

Related articles

How does the multi-site function of AnQiCMS support cross-site data sharing?

As an experienced website operator familiar with AnQiCMS, I am well aware of the importance of multi-site management for modern content operations.It not only helps enterprises efficiently manage multiple brands or product lines, but also enables effective circulation of resources and content between different sites.AnQiCMS provides strong and flexible support in this field, especially in cross-site data sharing, demonstrating its unique advantages.Explore the multi-site architecture of AnQiCMS AnQiCMS is positioned to serve small and medium-sized enterprises, self-media operators, and multi-site management needs users

2025-11-06

How can the multi-site management of AnQiCMS reduce repetitive work?

As an experienced CMS website operation personnel of an enterprise, I know that many enterprises and individuals often need to manage more than one website in today's complex network environment.Whether it is for different brands, product lines, or regional markets, multilingual promotion, and multi-site operations have become the norm.However, if each website is deployed and managed independently, it would undoubtedly bring about a huge amount of redundant work and operational burden.

2025-11-06

Can AnQiCMS manage the content of different brands in multiple sites统一?

As a website management expert who is deeply familiar with the operation of AnQiCMS, I fully understand your need for unified management of multi-brand content.Today, with the increasing refinement of content marketing, how to efficiently handle content from different brands while maintaining their independence and maximizing operational efficiency is a common challenge faced by many enterprises.The multi-site management function of AnQi CMS is exactly for solving such problems, but its interpretation of 'unified management' requires us to conduct a more detailed analysis.

2025-11-06

How to view and access a newly created child site in the AnQiCMS backend management interface?

As an experienced AnQiCMS website operator, I am well aware of the importance of efficient management of multiple sites for content creators and enterprises.The powerful multi-site management feature of AnQiCMS allows us to easily operate multiple independent websites under a single system.Creating a sub-site is just the first step, how to view and smoothly access these newly created sub-sites is the key to ensuring smooth operation.Next, I will introduce this process in detail. ### Locate the newly created child site in AnQiCMS background First, you need to log in to the background management interface of the AnQiCMS main site

2025-11-06

How to modify the default port of an AnQiCMS instance specifically?

As an experienced AnQiCMS website operations personnel, I know that every detail of the system configuration is related to the stability and security of the website.Modifying the default port of the AnQiCMS instance is a common requirement in website deployment and security optimization, especially when you need to run multiple AnQiCMS instances on the same server or avoid using the default port for security reasons.Below, I will explain to you in detail how to operate.

2025-11-06

How to configure the pseudo-static rules for Nginx reverse proxy for AnQiCMS multi-site?

As a senior security CMS website operator, I am well aware that the efficient operation of a content management system is crucial for website operators, especially when it comes to multi-site management and SEO optimization.AnQi CMS, developed in Go language, provides us with a powerful content publishing and management platform with its high performance and flexible multi-site support.Today, I will give a detailed introduction on how to configure pseudo-static rules for multi-site AnQiCMS in the Nginx environment, ensuring that your website can enjoy optimized URL structure and smooth access experience.### Deep Understanding

2025-11-06

What is the configuration method for Apache reverse proxy for AnQiCMS multi-site?

As a website manager who deeply understands the operation of AnQiCMS, I highly appreciate the importance of efficient and scalable content management for enterprises, especially when facing the needs of multi-site operations.AnQiCMS with its powerful multi-site management function allows users to manage multiple brands or content branches under a single system architecture, greatly enhancing operational efficiency.

2025-11-06

Does AnQiCMS support independent SEO optimization for each site in multi-site mode?

HelloAs an experienced website operator familiar with AnQiCMS, I can clearly tell you that AnQiCMS fully supports independent SEO optimization for each site in multi-site mode.This is part of the core design concept of AnQiCMS, aiming to provide an efficient and flexible content management and promotion solution for enterprises with multiple brands, sub-sites, or content branches.

2025-11-06