As a senior CMS website operation personnel of an enterprise, I know the importance of efficient management and flexible expansion.The AnQi CMS, with its multi-site management features, provides great convenience for operators.By combining the powerful reverse proxy capabilities of the Baota panel, we can easily implement a secure CMS service for multiple independent domain websites, greatly saving server resources and simplifying operations.

This article will elaborate on how to utilize the reverse proxy feature of Baota panel to deploy and manage multiple sites of Aanqi CMS, helping you operate efficiently.

Preparation work: Baota Panel and Anqie CMS Docker Environment

Before starting multi-site deployment, we need to make sure that the Baota panel is already installed on the server and the first safe CMS instance has been successfully deployed via Docker.The installation of Baota panel can be referred to its official guide, which is usually completed by executing a simple Linux command.

After completing the installation of the Baota panel, we need to enable the Docker feature in the panel, search for and install MySQL database in the Docker app store, and be sure to record the MySQL root password, which will be used during the installation of Anqi CMS.Later, search for 'anqicms' in the Docker app store and click to install.On the installation interface, you need to enter the domain name of the first site, an independent database name, the previously recorded MySQL root password, and an unused port (such as 8001).This port is the internal port that your Anqin CMS Docker container listens on, and all requests accessed through reverse proxy will eventually be forwarded to this port.

After installation, your first safe CMS site has been successfully run through the reverse proxy of Docker and Baota panel (usually automatically configured during installation). You can access it by visiting您的域名/system/Log in to the background management interface and use the default oneadmin/123456Change your password in a timely manner after logging in

Add a reverse proxy site using the Baota panel

Now, we already have a running Anqi CMS instance, it will be127.0.0.1:8001Listening for requests. The AnQi CMS itself has the ability to manage multiple sites, which means we do not need to deploy a separate AnQi CMS container for each new site.On the contrary, we can configure a separate domain name for each new site and use the reverse proxy of the Baota panel to forward the traffic of these domain names to the same Anqi CMS Docker instance.

In the left menu of the Baota panel, select the "Website" function area.Here, you will see a tab called 'Reverse Proxy'.Click this tab and then select the 'Add Proxy' button.In the pop-up configuration window, you need to make the following settings:

  • Domain: Enter the domain name of your new site, for examplenewsite.anqicms.com. This domain needs to be resolved in advance to your server IP address.
  • Target URL: This is the key point, you should fill in.http://127.0.0.1:8001. This means all visits.newsite.anqicms.comAll requests will be reverse proxied to the internal port that your previously deployed Anqi CMS Docker container is listening on.

After confirming that everything is correct, click the "OK" button to complete the creation of the reverse proxy site. The Baota panel will automatically configure the Nginx (or Apache) server for you, tonewsite.anqicms.comThe request is forwarded to the Anqi CMS container.

Configure a new site on the AnQi CMS backend

After setting up the reverse proxy on Baota panel, the domain name of the new site can already point to your Anqi CMS instance.However, AnQi CMS has not "known" the existence of this new site.Therefore, we need to log in to the backend management interface of your first Safe CMS instance for configuration.

In the left menu of the Anqi CMS backend, find the "Multi-site Management" feature and click the "Add New Site" button. In the pop-up site configuration form, you need to fill in the following information carefully:

  • Site name: Choose a recognizable name for your new site, such as "New Marketing Website".
  • Site root directoryThis item is very important, it is used to independently store the cache, static resources and other data of a new site to ensure data isolation between different sites. Since Anqicms is deployed in a Docker container, its root directory is/app/. Fill in here with/app/a unique path starting with/app/newsite_anqicms_com. It is recommended to replace the dots in the domain name with underscores to avoid directory naming conflicts. Ensure that this directory name does not duplicate any other site.
  • website addressEnter the full URL you have configured for your new site, for examplehttp://newsite.anqicms.com.
  • Administrator account password: Set up independent backend administration account and password for new site.
  • Database name: Similarly, for data isolation, you need to specify an independent database for the new site. It is recommended to use a domain name without dots as the database name, for examplenewsite_anqicms_com.
  • Duplicate database informationIf you are installing AnQi CMS using Docker and have full management permissions on the database, you can choose to 'reuse the default database account information'.This step saves you from having to fill in the database username and password again.If you want to place the database of the new site on a different database server, you need to manually fill in the corresponding database connection information.
  • Select the template to use: Choose a template suitable for the new site according to your needs.

After filling in, click the 'OK' button, Anqi CMS will create and initialize the new site for you.

Access and manage the new site

Up to this point, your new Anqin CMS site has been deployed and configured. You can now directly enter it in the browser.newsite.anqicms.comVisit the front page of the new site and start creating and publishing content.

To enter the background management interface of the new site, you can directly jump by clicking the "Access Backend" button in the "Multi-site Management" list, or manually enter it in the browser您的新域名/system/For examplehttp://newsite.anqicms.com/system/Then log in using the administrator account and password you set up on the new site.

In this way, you can easily manage multiple independent websites with isolated data on a single server using the same Aanqi CMS Docker instance, which greatly improves operational efficiency and resource utilization.

Frequently Asked Questions

Q1: Why is my new site reverse proxy configuration working, but when adding a site in the "Multi-site Management" section of the Anqicms CMS backend, the "Site Root Directory" must start with/app/?

This is because your security CMS is deployed inside a Docker container. In the Docker environment,/app/Is an AnQi CMS application in the default working directory within a container.To ensure that the data of the new site can be stored independently in the container file system, AnQi CMS requires you to specify a subdirectory based on this, so that an independent storage space can be created for each new site.If not present/app/Under the directory, the container may not be able to access or write these files, causing the new site feature to malfunction.

Q2: I have installed an AnQi CMS Docker instance and the port is 8001.How can I deploy a completely independent Aqie CMS instance (instead of creating it through multi-site management), what should I do?

If you need to deploy a completely independent AnQi CMS instance, for example for testing or other purposes, you can search and install AnQi CMS again in the Docker app store on the Baota panel.When installing, be sure to choose a different port for this new Anqi CMS instance, such as 8002.Then, configure a brand new domain for this new instance and point the new domain to the Baota reverse proxyhttp://127.0.0.1:8002. Each independent Aanqi CMS instance needs its own database and configuration, so when installing new, make sure to provide a unique database name and information.

Q3: In the Baota panel, when configuring Nginx pseudo-static rules for a new site, should I select 'PHP Project' and manually fill in the Nginx rules, or directly configure in 'Reverse Proxy'?

According to whether you are deploying a multi-site AnqiCMS, or deploying a brand new PHP project as a reverse proxy for the AnqiCMS site, you can choose different methods. When you add a new site in the "Multi-site Management" of AnqiCMS, **the practice is to directly configure reverse proxy for the new domain in the "Reverse Proxy" feature, with the target URL pointing to the internal address of the AnqiCMS Docker container you have already running (such ashttp://127.0.0.1:8001This approach is more direct and less likely to make mistakes. While the document mentions the "PHP project" and manually filling in the Nginx rewrite rules, it is more relevant to the multi-site deployment of AnqiCMS in non-Docker environments, or the case of using a PHP site as a reverse proxy for AnqiCMS.For the security CMS multi-site deployment using Docker, please directly use the Baota "reverse proxy" feature.