As a senior person who is well-versed in AnqiCMS and website operations, I fully understand the need for efficient management of multiple websites, especially how to use the reverse proxy function of the 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.

Preparation phase: Ensure that the AnqiCMS Docker environment is ready

Before you start configuring multi-site domain names, you need to make sure that the Baota panel is already installed on your server, and AnqiCMS has been successfully deployed as the main site using Docker.Usually, your AnqiCMS Docker container runs on some internal port of the server, such as the default port 8001.This main site will serve as the management center for all subsequent child sites, with the authority to manage multiple independent sites.If you have not completed the Docker deployment of AnqiCMS, it is recommended that you refer to the AnqiCMS Docker installation tutorial related to Baota panel first, complete the construction and initialization of the main site.

Configure the Baota panel reverse proxy site

Next, we will configure the reverse proxy for your new site in the Baota panel.The reverse proxy is used to forward external domain name requests to the AnqiCMS Docker container running internally, so that users can access your new site through the domain name.

First, log in to your Baota panel.In the navigation menu on the left, find and click the 'Website' option.After entering the website management interface, you will see a label for "reverse proxy".Click this label, then select the 'Add Reverse Proxy' button to start creating a new reverse proxy site.

In the pop-up 'Add Reverse Proxy' configuration window, you need to fill in some key information. In the 'Domain' field, enter the complete domain name you have prepared for the new site, for exampledev.anqicms.com.This domain must have been resolved to your server IP address.Next, in the "Target URL" field, enter the internal access address of your AnqiCMS Docker container.http://127.0.0.1:8001.If your AnqiCMS Docker container is configured with other ports, please modify it according to the actual situation.After filling in this information, click the "OK" button, the Baota panel will create and configure a new reverse proxy site for you.

Add a new site in AnqiCMS backend

After completing the reverse proxy configuration of Baota panel, the next step is to add specific information of the new site in the main station background of AnqiCMS.This step is the core of AnqiCMS multi-site management.

Log in to the AnqiCMS main station backend you have deployed.In the left navigation bar, find and click the "Multi-site Management" function.After entering the multi-site management page, you will see a "Add New Site" button, click it to start adding a new site.

In the configuration interface for "Add new siteThe 'site root directory' is very important./app/Start. To avoid conflicts with other site directory names and maintain consistency, it is recommended that you replace the dots in the domain name of the new site with underscores as the name of the root directory, for exampledev_anqicms.comThe directory name can be/app/dev_anqicms_comEnsure that this directory name is unique. "Website address" should be filled with the reverse proxy domain name you just configured in the Baota panel, for examplehttp://dev.anqicms.com.Set an independent "admin account" and "admin password" for the new site, which will be the backend credentials for you to manage this new site in the future.dev_anqicms_comTo ensure the uniqueness of the database name, prevent data overwrite.In the "Database Information Reuse" option, since we are deploying AnqiCMS in a Docker environment, we usually have full database management permissions, so we can directly select "Reuse Default Database Account Information" and do not need to re-enter the database username and password.Finally, choose a suitable "template" based on your preferences and website positioning.

After confirming that all information is correct, click the "OK" button to complete the creation of the new site. AnqiCMS will automatically create the necessary database tables and file structure for the new site.

Visit and manage your new site

Up to now, you have successfully configured a new multi-site domain for AnqiCMS through the Baota reverse proxy function.Now, you can directly enter the domain name of the new site in the browser to access its front page.

If you need to access the admin panel of a new site for management, you can directly jump by clicking the "Access Admin" button in the multi-site management list, or by entering the domain name of the new site in the browser address bar followed by/system/Path, for examplehttp://dev.anqicms.com/system/Log in with the administrator account and password you set when creating your new site to start publishing content, adjusting templates, and setting various features.

By this method, you can efficiently manage multiple independent domain sites in a set of AnqiCMS systems, greatly simplifying the complexity of operation and maintenance, and effectively saving server resources.


Frequently Asked Questions

Why is it recommended to use reverse proxy and AnqiCMS built-in multi-site functionality instead of deploying a separate AnqiCMS instance for each site?The use of reverse proxy in combination with the multi-site feature of AnqiCMS has significant advantages.It allows you to manage all websites on a single AnqiCMS system, sharing core code and infrastructure, thereby significantly reducing operation and maintenance costs and resource consumption.You do not need to deploy and update programs separately for each site, all content, users, and configurations can be managed in a unified backend.This not only improves efficiency, but also simplifies the process of security updates and troubleshooting.

How can I adjust the configuration if my AnqiCMS Docker container is not using the default 8001 port? If your AnqiCMS Docker container uses a non-default port during deployment, such as 8002 or 8003, then when configuring the Baota panel reverse proxy, you need to enter the "Target URL" in the "Target URL" field.http://127.0.0.1:8001is modified tohttp://127.0.0.1:您的实际端口For example, if the container port is 8002, then fill inhttp://127.0.0.1:8002.In addition, when adding a new site in the AnqiCMS main station backend, although the port is not filled in directly, the system interacts with the database through the port configured by the main site, therefore, ensuring the matching of the main site and container ports is crucial.

How should I troubleshoot the issue if my new site is inaccessible after configuration?When the new site cannot be accessed normally, you can investigate from several aspects.First, check if the domain name resolution is correct, make sure that your new domain name is correctly resolved to the server IP.Secondly, check the reverse proxy configuration in the Baota panel to ensure it is accurate, especially that the target URL and domain match.At the same time, check the firewall settings of the server to ensure that ports 80/443 (if you have enabled SSL) are open to the outside.Finally, check the operation log of the AnqiCMS main site and the reverse proxy log of the Baota panel, as these logs usually provide valuable error information to help you locate the problem, such as the backend service not starting, database connection failure, or insufficient permissions.