How to deploy multiple independent AnQiCMS sites on the same physical server?

Calendar 👁️ 59

In the rapidly changing digital age, businesses and content operators often face the challenge of managing multiple websites.AnQiCMS (AnQiCMS) is an efficient content management system developed based on the Go language, and its multi-site management function is exactly designed to solve this pain point.As an experienced website operator proficient in AnQi CMS, I know that readers are eager for efficient and convenient solutions.Today, I will elaborate on how to deploy multiple independent security CMS sites on the same physical server, helping you optimize resources and simplify management.

Embark on the journey of multiple sites: The core advantages of AnQiCMS

The Anqi CMS project is clearly positioned to become the preferred content management tool for small and medium-sized enterprises and content operation teams.One of its core highlights is the powerful "multi-site management" capability.This means you do not need to deploy a separate security CMS code for each site, but through a master instance, you can uniformly create, manage and maintain multiple independent content sites.This greatly reduces the repetitive workload, facilitates cross-site data sharing and resource integration, and can effectively utilize server resources to reduce O&M costs.Whether it is to have multiple brand sub-sites or to manage a media matrix with different content branches, Anqi CMS's multi-site function can provide a simple and efficient solution.

Comprehensive preparation before deployment

Before deploying multiple secure CMS sites, some basic preparations are essential.Firstly, you need a stable server. It is recommended to choose the Linux operating system, as it is more closely integrated with the Go language backend of Anqicms, providing better performance and security.In addition, MySQL database and Nginx or Apache and other reverse proxy server software need to be installed on the server.

Domain configuration is a key link in multi-site deployment. You need to prepare a separate domain for each independent Safe CMS site (for examplesite1.com,site2.com), and make sure that these domains have been correctly resolved to your server IP address. The correct DNS configuration is the prerequisite for users to access your various websites.

Deploy multiple AnQi CMS sites on the same server

The multi-site deployment strategy of AnQi CMS is based on a core concept: one AnQi CMS main program manages multiple front-end sites.This means you only need to run a safe CMS binary file or a Docker container, then use its backend features and reverse proxy configuration to differentiate and manage different websites.

Deploy the main AnQi CMS instance

Firstly, we need to deploy a main security CMS instance on the server. This can be achieved in two main ways:

Method one: Using the convenient deployment of Baota panel or 1Panel

If you use Baota panel (or its international version aaPanel) or 1Panel and other visual panels, the deployment process will be simplified:

You can search and install the Docker version of AnQiCMS in the panel app store, or directly deploy the AnQiCMS binary file through the "Go project" feature.

If you choose Docker deployment, please specify an internal port when creating a container (such as8001)and the corresponding server exposed port. If you plan to run multiple independent Aanqi CMS instances in Docker later (although Aanqi CMS's "multi-site management" feature allows a single instance to manage multiple sites, but in some specific scenarios, you may want to run multiple isolated Docker containers), you need to allocate a different server exposed port for each container.

After completing the installation of a Docker or Go project, configure a reverse proxy for the main security CMS instance. Create a reverse proxy site in the panel's 'Website Management', and enter your main domain (for examplemain.com) Points to the internal address and port of the AnQiCMS instance (for example127.0.0.1:8001). This will ensure that your main site can be accessed normally.

Method two: manual deployment via command line

For those who prefer manual control or in environments without a visual panel, you can choose command line deployment:

Download the Linux installation package suitable for your server architecture from the AnQi CMS official website and unzip it into the specified directory, for example/www/wwwroot/anqicms-main.

Enter the directory after unzipping and executestart.shScript to start the Anqi CMS main program. It is recommended to add a scheduled task to check and start the program every minute to ensure that it runs automatically after the server restarts.crontab -eAdd a scheduled task to set up a check and start every minute.start.sh.

Next, you need to configure Nginx or Apache reverse proxy. For your main domain (for examplemain.com), create a new virtual host configuration. TorootThe directory points to the main program directory of AnQiCMSpublicfolder (for example/www/wwwroot/anqicms-main/public),and configure reverse proxy rules to forward all requests to the listening port of the AnQiCMS instance (such ashttps://en.anqicms.comAfter the configuration is completed, restart the Nginx/Apache service to make the changes take effect.

Add and manage multiple independent sites through the Anqi CMS backend.

After the main security CMS instance is deployed and running normally, it is the key step to add other independent sites using its powerful multi-site management function.

Log in to the backend management interface of your main AnQi CMS instance.In the left menu, you will find the "Multi-site Management" feature.Click the 'Add new site' button to start configuring your new website.

Here, you need to fill in a series of key information for the new site:

  • Site name: Used for background identification and management, please fill in according to the actual situation.
  • Site root directoryThis is a directory used to store independent data such as new site cache, uploaded files, etc. For Docker deployment, it is usually followed by/app/for example/app/dev_anqicms.com; For manual deployment, it is a new directory on your server, for example/www/wwwroot/newsite.com. Make sure the root directory name of each site is unique to avoid data confusion.
  • website address: Enter the complete domain name of the new site, for examplehttp://dev.anqicms.comThis domain must have been resolved to your server IP.
  • Administrator account password: Set up independent backend administration account and password for new site.
  • Database nameEach new site should have an independent database to ensure complete data isolation. Please fill in a unique database name, for exampledev_anqicms_comIf you are installed via Docker and have full management permissions for the database, you can choose to "reuse the default database account information", and Anqicms will automatically create and configure the database for you.
  • Select the template to useSelect a suitable template for the new site.

After filling in the information and clicking Confirm, Anqi CMS will create this new site instance for you in the background.

Configure the reverse proxy for the new site.

The final step is to configure reverse proxy for your new site. Add an independent virtual host or site configuration for each new domain in your Nginx or Apache configuration.Similarly, point the domain names of these new sites to the listening port of the security CMS main instance (for examplehttps://en.anqicms.com)

For example, the new site configuration for Nginx might look like this:

server
{
    listen       80;
    server_name dev.anqicms.com; # 新站点的域名
    root /www/wwwroot/newsite.com/public; # 新站点的根目录(对应安企CMS后台设置的站点根目录,但此处指向其public子目录)

    location @AnqiCMS {
        proxy_pass https://en.anqicms.com; # 指向主安企CMS实例的端口
        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;
    }
    access_log /var/log/nginx/newsite.access.log; # 独立的访问日志
}

After configuration, make sure to restart your Nginx/Apache service so that the new reverse proxy rules take effect.Your new site is now accessible and can be used through its dedicated domain.You can click the 'Access Backend' button from the 'Multi-site Management' list in the main AnQi CMS backend to directly access the new website's backend

Related articles

How to use the stop script `stop.sh` written by author fesion in AnQiCMS?

AnQiCMS (AnQiCMS) is a high-efficiency and feature-rich Go language content management system, its stable operation cannot do without refined deployment and management.As a website operator, we not only need to pay attention to content creation and optimization, but also ensure the smooth operation of the system backend.In this case, the stop script `stop.sh` plays a crucial role, which can help us safely and effectively manage the lifecycle of AnQiCMS services.### Core function to stop the script `stop.sh` `stop

2025-11-06

What is the main function of the startup script `start.sh` written by "author fesion" in the AnQiCMS task schedule?

In the daily operation of AnQiCMS (AnQiCMS), the stable operation of the system is the key to ensuring user experience and content distribution efficiency.To ensure that the AnQiCMS service can provide content continuously and uninterruptedly, even if it encounters unexpected interruptions and can recover quickly, a meticulously designed startup script plays a crucial role in the scheduled tasks.Among them, the `start.sh` script written by "author fesion" was born for this purpose, and it constitutes the core of the self-protection mechanism of AnQiCMS service.### `start

2025-11-06

How to configure Nginx pseudo-static rules for AnQiCMS on the Baota panel?

As an experienced CMS website operation personnel of AnQi, I know that efficient content management and excellent search engine optimization (SEO) play a decisive role in the success of the website.Static page, it is an indispensable part of it, not only does it make the website URL structure more concise and beautiful, but more importantly, it can significantly improve the search engine's ability to capture and understand the content of the website.AnQiCMS was designed with this in mind from the beginning, it has built-in powerful pseudo-static management functions, but to make full use of it, the configuration of Nginx pseudo-static rules on the server side is crucial

2025-11-06

How to install AnQiCMS's Go project on a Linux server?

As a website operator familiar with AnQiCMS, I fully understand the importance of an efficient, stable, and easy-to-manage content system for website operation.AnQiCMS is a modern enterprise-level content management system developed based on the Go language, with its high concurrency, high security, easy deployment, and excellent SEO-friendly features, it has become an ideal choice for many small and medium-sized enterprises and content operation teams.This article will detail how to install and deploy AnQiCMS's Go project on a Linux server, aiming to help you smoothly set up your own website.###

2025-11-06

How to configure the new site root directory for AnQiCMS multi-site deployment to achieve data isolation?

As an experienced security CMS website operator, I am well aware of the core role of the content management system in today's digital marketing.Especially when facing the needs of multi-site operations, the powerful functions and flexible configuration provided by AnQiCMS are undoubtedly our reliable assistant.Among them, how to properly configure the root directory of a new site to achieve data isolation is a key link to ensure the efficient and safe operation of multiple sites.

2025-11-06

How to configure reverse proxy through 1Panel when installing AnQiCMS with Docker?

AnQiCMS, as an enterprise-level content management system developed based on the Go language, is an ideal choice for small and medium-sized enterprises and content operation teams with its efficient, secure, and user-friendly features.Combining 1Panel, a convenient server management panel, deploying AnQiCMS via Docker containers can greatly simplify the installation and maintenance process.To allow AnQiCMS to access through a custom domain and hide its internal running port, configuring reverse proxy is an essential step before the website goes into operation.

2025-11-06

Install AnQi via Docker on aaPanel

Anq CMS is an enterprise-level content management system based on the Go language, designed to provide an efficient, customizable and easy-to-expand content management solution.As a website operator familiar with content creation and optimization, I understand how important a stable and efficient system is.This article will give a detailed introduction on how to use the Docker function of the aaPanel to quickly deploy the Aq CMS, helping you build and start your website efficiently.

2025-11-06

What is the real meaning of checking if the PID exists in the AnQiCMS startup script?

As an experienced security CMS website operations personnel, I know that the logic behind each system component is crucial for the stable operation and efficient management of the website.The startup script serves as the starting point of the application lifecycle, its design often embodies considerations for system robustness and operational convenience.Now, let's delve into the true significance of the "check if PID exists" section in the Anqi CMS startup script.

2025-11-06