Today, I will delve into how to deploy AQ CMS multi-site in the Docker environment and configure reverse proxy. This not only enhances the convenience of deployment, but also provides strong support for your multi-site operation.

Embrace Docker, build an efficient and stable security CMS multi-site environment

Auto CMS is positioned to serve small and medium-sized enterprises and content operation teams. One of its core strengths is the powerful multi-site management capability, which allows you to centrally manage multiple brands, sub-sites, or content branches, greatly reducing redundant work.When we combine this advantage with Docker containerization technology, deployment and management will become more efficient and flexible than ever before.Docker provides a lightweight, portable, and self-contained runtime environment, ensuring that CMS can run consistently anywhere and simplifying dependency management and environment configuration.For users who need to operate multiple sites, the isolation, scalability, and ease of maintenance of Docker are undoubtedly the key to building a stable, high-performance website cluster.

Deploy the first security CMS site container

The first step to deploy AnQi CMS in a Docker environment is to establish a basic containerized runtime environment and configure reverse proxy for your main site.Here, we will take mainstream panel tools as examples, such as 1Panel or Baota Panel, which integrate Docker management functions and greatly simplify the operation process.

Firstly, please make sure that Docker is installed on your server, and you also need to install a MySQL database service through the app store on the panel for QiCMS data storage.If installed through 1Panel, please select OpenResty as the reverse proxy server in the app store.

Next, we need to create a container for Secure CMS in Docker. In the container management interface of the panel, select Create Container. Name the container, for exampleanqicms-mainIn mirror selection, enter manuallyanqicms/anqicms:latestTo get the latest stable version of the AnQi CMS mirror. A key step is to configure the port: set the container's internal port to8001expose it to a server's available port, for example, the same as8001This port is the only interface for the Auto CMS application to provide services. After creating the container, set an appropriate restart policy to ensure high availability.

The container has been successfully started, and the next step is to configure reverse proxy to forward external domain requests to the AnQiCMS container.Create a new reverse proxy site in the panel website management feature.yourmaindomain.com,and set the proxy address to the local IP and port of the Docker container, usually127.0.0.1:8001.Reverse proxy not only implements port mapping, but also allows you to access multiple sites through different domain names on the same server, and can handle advanced features such as SSL certificates and traffic distribution.Configure the settings, access your primary domain, and follow the instructions of AnQiCMS to complete the initialization installation, including database connection and administrator account setup.

Expand multi-site management: the powerful charm of Anqi CMS

The strength of AnQi CMS lies in its built-in multi-site management function, which means you do not need to deploy an AnQi CMS container separately for each site.An English CMS Docker container is enough to manage hundreds or even thousands of independent sites.This design concept greatly saves server resources and simplifies the complexity of operation and maintenance, perfectly matching the project positioning of AnQiCMS 'unified management of different content sites'.

  • Site Name: Used for friendly names to distinguish in the background.
  • Site Root Directory: This is the independent storage path for new site data. Since AnQiCMS runs in a Docker container,/app/The directory, therefore here should be/app/Start with, and use the domain name (dots replaced with underscores) as the subdirectory name, for example/app/dev_anqicms_com。Ensure that the directory names of each site are unique to avoid data conflicts.
  • Website address: The complete domain name of the new site, for examplehttp://dev.anqicms.com.
  • Administrator account password: Set an independent backend management account for the new site.
  • Database name: Specify a unique database name for the new site, and it is recommended to use a domain name prefix (dots replaced with underscores) as well, for exampledev_anqicms_com。English supports the reuse of Docker MySQL account information, no additional database credentials need to be configured.
  • Select the template to use: Choose the appropriate template according to your design requirements.

Complete these configurations and click confirm, AnQiCMS will create all necessary data structures and configuration files for the new site for you internally.

Configure reverse proxy for the new site

After adding a new site in the AnQi CMS backend, although AnQiCMS has 'recognized' this new site, external users still cannot access it.You need to configure a separate domain and reverse proxy rule for each new site in the server's panel.

Go to your server's website management interface (such as 1Panel or Baota panel), click on "Create Website" or "Add Reverse Proxy" again. Enter the domain name of the new site, for exampledev.anqicms.comPlease note that the proxy address of this new site still needs to point to the exposed port of your unique AnQiCMS Docker container,127.0.0.1:8001。This is because the AnQiCMS internally will use the incomingHostThe header information (i.e., the domain name visited by the user) is used to determine which site the request belongs to and to provide the corresponding content.Each reverse proxy will forward requests for specific domains to the same AnQiCMS container, which then identifies the corresponding AnQiCMS sub-site based on the domain.

Repeat the above steps to configure reverse proxy for each new site.Once configured, you can access each independent AnQiCMS sub-site through its corresponding domain.In the "Multi-Site Management

key configuration and **practice

When deploying multiple sites of AnQi CMS and configuring reverse proxy, there are several practices that you should pay attention to, as they will directly affect the performance, security, and maintainability of your website:

  • Domain resolution: Make sure that all site domain names are correctly resolved to your server IP address before configuring the reverse proxy. This is the foundation for all external access.
  • Resource planning
  • Database isolation: Although multiple AnQiCMS sites can share the same MySQL database service, it is strongly recommended to configure an independent database instance for each site.This can effectively isolate data from different sites, prevent cross-contamination, and facilitate future data backup, recovery, and migration.
  • Security enhancement: English provided by QiCMS offers a custom backend domain feature, allowing you to set a separate access address for each site's backend, enhancing security.Also, be sure to use a complex and unique administrator password and update it regularly.
  • SEO optimization: English 安QiCMS has built-in powerful SEO tools, such as pseudo-static, 301 redirection, Sitemap generation, Robots.txt configuration, keyword library management, etc.In a multi-site environment, make sure to configure and optimize these SEO settings independently for each site to maximize the search engine visibility of each site.

Through containerization deployment with Docker and the powerful multi-site management feature of CMS itself, you will be able to operate your website cluster with extremely high efficiency and flexibility, whether it is content marketing for small and medium-sized enterprises or content distribution for self-media, it will be a breeze.

Frequently Asked Questions

Q1: I deployed AnQiCMS in a Docker container and created multiple sub-sites.Why does it always jump to the main site's backend interface when accessing the backend of one of the child sites?

A1:This is usually due to your reverse proxy configuration not correctly passingHostheader information. AnQiCMS detects the header information in the request.HostThe field is used to identify which sub-site the user is visiting. Please check your reverse proxy configuration (such as Nginx or OpenResty) to ensure it is included.proxy_set_header Host $host;This command. If using the panel tool, please confirm that the reverse proxy module has correctly processed this information.

Q2: Can I configure an independent Docker container for each AnQiCMS sub-site?

A2:Although technically feasible, this is contrary to the design philosophy of the multi-site management built into AnQiCMS, and it will increase unnecessary resource consumption and management complexity.The multi-site function of AnQiCMS is designed to allow you to manage all sites within a single running instance.Deploying containers separately for each sub-site will disable the multi-site management feature, and you will not be able to manage all sites uniformly in the background of the main site. At the same time, it will also consume more CPU, memory, and storage resources.It is recommended that you follow the instructions in the document to add and manage child sites within an AnQiCMS container through its background multi-site management feature.

Q3: How to ensure that my AnQiCMS multi-site is implemented with data isolation and high availability in the Docker environment?

A3:For data isolation, when adding a new site in the AnQiCMS backend, please configure a separate database name and site root directory for each site.Even if they share the same MySQL Docker container and AnQiCMS Docker container, the data is independent.restart: alwaysorrestart: on-failure