How to install and manage multiple AnqiCMS sites on the same server?

Calendar 81

As an experienced CMS website operation personnel in the AnQi company, I am well aware that in the increasingly fierce network environment, efficient management of multiple websites is crucial for small and medium-sized enterprises and content operation teams.AnQi CMS offers an elegant and efficient solution with its powerful multi-site management capabilities to address this pain point.Below, I will elaborate on how to install and manage multiple AnQi CMS sites on the same server.

Understanding the multi-site architecture of AnqiCMS

The AnQi CMS was designed with the need for multi-site management from the very beginning.One of its core advantages is the "multi-site management" feature, which allows users to create and independently manage multiple sites under a unified system architecture, thereby reducing redundant work and facilitating cross-site data sharing and resource integration.This means that you do not need to deploy a separate set of CMS code and runtime environment for each website, but rather manage all sub-sites through a core CMS application instance.This design greatly improves resource utilization and management efficiency.

In the multi-site architecture of AnQi CMS, each logical site has an independent database configuration, file storage path (such as cache, uploaded files, etc.), and independent front-end template and backend management permissions.Through the reverse proxy configuration of the front-end web server (such as Nginx or Apache), different domain names are pointed to the same Safe CMS application instance, and Safe CMS identifies and loads the corresponding site content based on the requested domain name.

Deploy the first AnQi CMS instance

Before starting to manage multiple sites, we first need to deploy a secure CMS core instance on the server. This instance will serve as the management center for all future sites.

You can choose any of the following methods to deploy your first AnQi CMS instance:

  1. Use the Baota panel's Go project feature (recommended)If you use Baota panel, you can conveniently deploy Anqi CMS with its 'Go project' feature. First, in/www/wwwroot/Create a directory for your main site under the directory, for exampleanqicms.comAnd upload the Linux installation package of AnQi CMS after unzipping it. Then, in the Baota panel, go to "Website" -> "Go project", click "Add Go project", and point the project executable file to the executable file of the unzipped AnQi CMS (for example/www/wwwroot/anqicms.com/anqicms),The project port is set to an unused port (for example,8001). Bind your primary domain and make sure to check "Boot up automatically". After completing the configuration, visit your primary domain and follow the instructions to complete the initialization installation of Anqi CMS.

  2. Deploy through a Docker containerThe AnQi CMS also supports Docker deployment, which provides excellent isolation and portability.Whether you use the Docker management interface of 1Panel, aaPanel, or Baota Panel, the steps are similar.First, make sure that the server is installed with Docker and MySQL (it is recommended to use the Docker version of MySQL).Then, pull from the Docker App Store or through the commandanqicms/anqicms:latestImage, and deploy it on your server, exposing a container port (for example8001)。Next, create a reverse proxy site for your main domain in your control panel (1Panel/aaPanel/Baota), and proxy external requests to127.0.0.1:8001Finally, visit your main domain for initial installation.

  3. Manual deployment via command line.For users without a graphical panel or who prefer manual configuration, you can deploy on a Linux server via the command line. Download the Linux installation package of Anqi CMS and unzip it into a specified directory (such as/data/wwwroot/anqicms.com)。Configure an Nginx or Apache blockserverblock, point your main domain to the port that the secure CMS instance is listening on (for example8001Set up reverse proxy rules.At the same time, you may need to configure a scheduled task (cron job) to ensure that the security CMS can automatically start after the server restarts and continue to run.

No matter which way you choose, the key is to ensure that a secure CMS instance is running on a specific port on the server (such as 8001), and your main domain has been reverse proxied to this port via Nginx or Apache.

Configure the web server to host multiple sites

The strength of AnQi CMS lies in its ability to handle requests from different domain names through a running instance.Therefore, when you need to add a new site, the main work focuses on the configuration of the web server (Nginx/Apache).

For each new site, you need:

  1. Prepare a new domain:Make sure each new site has a unique domain name and that these domains are resolved to your server IP address.

  2. Configure Nginx/Apache reverse proxy:

    • Nginx configuration example:Add an independent one for each new domain name:serverBlock. In thisserverIn the block, the request will be reversed proxied to the port of the security CMS instance you deployed previously. For example, if your security CMS instance is running on8001Port:

      server {
          listen 80;
          server_name new-site1.com; # 您的第一个新站点域名
          root /www/wwwroot/anqicms.com/public; # 指向AnqiCMS的public目录
      
          location @AnqiCMS {
              proxy_pass https://en.anqicms.com;
              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/new-site1.com_access.log;
          error_log /var/log/nginx/new-site1.com_error.log;
      }
      
      server {
          listen 80;
          server_name new-site2.com; # 您的第二个新站点域名
          root /www/wwwroot/anqicms.com/public; # 同样指向AnqiCMS的public目录
      
          location @AnqiCMS {
              proxy_pass https://en.anqicms.com;
              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/new-site2.com_access.log;
          error_log /var/log/nginx/new-site2.com_error.log;
      }
      

      Please note,rootThe directive usually points to the directory under your Aanqi CMS installationpublicfolder because static files are provided from here. But actually, all dynamic requests areproxy_passforwarded to127.0.0.1:8001.

    • Apache configuration example:If you use Apache, you canVirtualHostset up reverse proxy in the configuration.

      <VirtualHost *:80>
          ServerName new-site1.com
          ProxyRequests Off
          ProxyPreserveHost On
          ProxyPass / https://en.anqicms.com/
          ProxyPassReverse / https://en.anqicms.com/
          ErrorLog ${APACHE_LOG_DIR}/new-site1.com-error.log
          CustomLog ${APACHE_LOG_DIR}/new-site1.com-access.log combined
      </VirtualHost>
      
      <VirtualHost *:80>
          ServerName new-site2.com
          ProxyRequests Off
          ProxyPreserveHost On
          ProxyPass / https://en.anqicms.com/
          ProxyPassReverse / https://en.anqicms.com/
          ErrorLog ${APACHE_LOG_DIR}/new-site2.com-error.log
          CustomLog ${APACHE_LOG_DIR}/new-site2.com-access.log combined
      </VirtualHost>
      

      Make sure the Apachemod_proxyandmod_proxy_httpmodule is enabled.

After configuration, make sure to restart the Nginx or Apache service to make the changes take effect.

Add and manage new sites in the Anqi CMS backend.

After the web server is configured, the new domain has already been able to point to your secure CMS instance.Next, you need to log in to the main station's Anq CMS backend to formally add and configure the new site.

  1. Log in to the main site backend:Use the administrator account you set during the first installation to log in to the backend management interface of your main AnQi CMS site (for examplehttp://anqicms.com/system/)
  2. Enter multi-site management:Find and click the "Multi-site management" feature in the left menu.
  3. Add a new site:Click the “Add new site” button, and you will see a form that requires you to fill in the details of the new site.
    • Site Name:Choose an easy name for the new site.

Related articles

How to deploy AnqiCMS with one-click through aaPanel (International Edition)?

HelloAs an experienced website operator, I am very happy to give you a detailed explanation of how to conveniently deploy AnQi CMS on aaPanel (Baota International Edition).AnQi CMS is becoming the preferred choice for an increasing number of small and medium-sized enterprises and content operation teams with its high-performance architecture based on the Go language, SEO-friendly design, and powerful multi-site management capabilities.Through the one-click deployment function of Docker in aaPanel, the whole process becomes extremely simple and efficient, allowing you to quickly set up and engage in content operation.

2025-11-06

How to quickly deploy AnqiCMS application through Docker on Panel panel?

As an experienced website operations manager, I know the importance of an efficient and secure content management system for enterprises and self-media.AnQiCMS, with its lightweight and high-performance features based on the Go language, is our preferred choice for content deployment.In daily operations, we often need to quickly launch new sites, and Docker combined with the 1Panel panel provides an extremely convenient solution.Next, I will elaborate on how to quickly deploy the AnqiCMS application using Docker technology through the 1Panel panel.

2025-11-06

What are the detailed steps for installing AnqiCMS using Docker on BT Panel?

As an experienced website operations manager, I fully understand the importance of an efficient and secure CMS system for enterprises.AnqiCMS (AnqiCMS) with its high-performance architecture in Go language and many enterprise-level features, is undoubtedly the preferred choice for many operation teams.Today, I will give you a detailed explanation of how to install and deploy AnqiCMS on the Baota panel through Docker, a modern and convenient way, so that your website can go online quickly and run stably.

2025-11-06

How to install and deploy AnqiCMS on a Linux server?

As an experienced Anqi CMS website operations personnel, I am very happy to be able to elaborate in detail on how to install and deploy AnqiCMS on a Linux server.AnqiCMS as a lightweight enterprise content management system developed based on the Go language, with its high efficiency, security, and SEO-friendly features, has become a powerful tool for our content operation team.This article will guide you through the installation and deployment process in the Linux environment, ensuring that your website can go online quickly and run stably.

2025-11-06

How to configure domain names for AnqiCMS multi-sites using the Baota reverse proxy feature?

As an experienced person who is proficient in AnqiCMS and website operation, I fully understand the need for efficient management of multiple websites, especially on how to use the reverse proxy function of Baota panel to configure domain names for your AnqiCMS multi-site.The strength of AnqiCMS lies in its multi-site management capabilities, while Baota panel provides convenient graphical interface support for this process.Now, let's delve deeper into how to implement this configuration step by step.

2025-11-06

How to solve the problem of port occupation or incorrect pseudo-static rules during the installation of AnqiCMS?

As an experienced CMS website operation personnel in a security enterprise, I know that some common but crucial issues may lead to installation difficulties during the system deployment.Among the common problems encountered by new users are the occupied ports and incorrect configuration of pseudo-static rules.Correctly identify and solve these problems is the basis for ensuring the smooth operation of AnQiCMS and giving full play to its content management advantages.

2025-11-06

How to smoothly upgrade AnqiCMS 2.x to 3.x version?

**AnqiCMS 2.x version upgrade to 3.x detailed guide** As an experienced AnqiCMS operations personnel, I know that each version upgrade is crucial for the stable operation of the website and the efficiency of content management.AnqiCMS upgraded from version 2.x to 3.x, not only brought performance optimization and functional enhancement, but also innovated in system deployment and multi-site management, especially through the "Go project" management method, making system maintenance simpler and more efficient.

2025-11-06

How to add and edit document content and its recommended attributes in the AnqiCMS backend?

As an experienced CMS website operation personnel, I know that content is the lifeline of the website, and an efficient content management system is the key to our successful operation.AnQi CMS, with its simple and efficient features, provides us with powerful content creation, publishing, and optimization tools.Next, I will give a detailed introduction on how to add and edit document content in the Anqi CMS backend, and effectively utilize its recommended attributes.In AnQi CMS, document content is the core of website information display.

2025-11-06