As a senior security CMS website operations personnel, I fully understand the importance of efficient management and flexible expansion.The CMS provides great convenience for operators with its multi-site management function.Combining the powerful reverse proxy capabilities of the Baota panel, we can easily implement a set of security CMS services for multiple independent domain websites, greatly saving server resources and simplifying operation and maintenance work.

This article will detail how to use the reverse proxy feature of Baota panel to deploy and manage multiple sites of security CMS, helping you operate efficiently.

准备工作:English panel and Aqara CMS Docker environment

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

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

After installation, your first security CMS site has been successfully run through Docker and Baota Panel's reverse proxy (usually automatically configured during installation). You can access您的域名/system/Enter the background management interface and use the default oneadmin/123456Change the password immediately after logging in

Use the Baota panel to add a reverse proxy site

Now, we already have a normal running security CMS instance, it will be127.0.0.1:8001Listening for requests.The AnQi CMS itself has multi-site management capabilities, which means we do not need to deploy a separate AnQi CMS container for each new site.Alternatively, we can configure a separate domain for each new site and use the reverse proxy on the Baota panel to forward all the traffic from these domains to the same secure CMS Docker instance.

In the left menu of the Baota panel, select the "Website" function area.Here, you will see a tab labeled "Reverse ProxyClick this tab and then select the 'Add Proxy' button.

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

After confirming, 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, which willnewsite.anqicms.comThe request is forwarded to the security CMS container.

In the Anqi CMS backend, configure a new site

Completed the reverse proxy setting of the Baota panel, the domain of the new site can now point to your security CMS instance.However, the Anqi CMS has not 'known' about the existence of this new site.Therefore, we need to log in to the backend management interface of your first security 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 carefully fill in the following information:

  • Site Name:Choose a name for your new site that is easy to recognize, 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 the new site to ensure data isolation between different sites. Since the security CMS is deployed within a Docker container, its root directory is/app/. You need to 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. Please ensure that this directory name does not duplicate any other site.
  • Website address:Enter the complete URL you have configured for the new site, for examplehttp://newsite.anqicms.com.
  • Administrator account passwordSet up a separate admin account and password for the new site.
  • Database nameSimilarly, for data isolation, you need to specify an independent database for the new site. It is recommended to use a domain name replaced by dots as the database name, for examplenewsite_anqicms_com.
  • Database information reuse:If you install the security CMS using Docker and have full management permissions over the database, you can choose to "re-use the default database account information".This can save the step of re-entering the database username and password.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:Select a template suitable for the new site according to your needs.

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

Access and manage the new site

Up to now, your new AnQi 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 with the administrator account and password you set when creating your new site.

By this method, you can easily manage multiple independently running, data-isolated websites on a single server using the same secure CMS Docker instance, greatly improving operational efficiency and resource utilization.

Frequently Asked Questions

Q1: Why does the "site root directory" must start with something when I add the site in the "Multi-site Management" section of the "Security CMS" backend, even though my new site's reverse proxy configuration is correct?/app/开头?

This is because your CMS is deployed within a Docker container. In the Docker environment,/app/Is the default working directory of the AnQi CMS application inside the container.To ensure that the data of the new site can be stored independently in the container file system, the Safe CMS requires you to specify a subdirectory based on this, so that an independent storage space can be created for each new site./app/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 Auto CMS Docker instance, and the port is 8001.How can I deploy a completely independent CMS instance (not created through multi-site management)?

If you need to deploy a completely independent security CMS instance, such as for testing or other purposes, you can search and install security CMS again in the Docker app store on Baota panel.When installing, be sure to select a different port for this new CMS instance, such as 8002.http://127.0.0.1:8002Each independent security CMS instance needs its own database and configuration, so please ensure to provide a unique database name and information during installation.

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 new PHP project as a reverse proxy for an AnqiCMS site, you can choose different methods. When you add a new site in the "Multi-site Managementhttp://127.0.0.1:8001)。This way is more direct and less likely to make mistakes.And the "PHP project" mentioned in the document and the manual filling of Nginx rewrite rules are more for 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 of Docker, please directly use the Baota's 'Reverse Proxy' feature.