How to set up reverse proxy when deploying AnQiCMS multi-site with 1Panel?

Calendar 👁️ 154

Dear website operation peers, hello! As a seasoned veteran in content operation for many years, and also a loyal user and in-depth practitioner of AnQi CMS, I know that in the increasingly fierce market competition, efficient content management and flexible multi-site deployment are crucial for attracting and retaining users.AnQi CMS, with its high-performance architecture in Go language and excellent multi-site management capabilities, is exactly the tool we need to meet these challenges.

Today, I will combine my experience in deploying multiple sites of Anqin CMS using 1Panel to give you a detailed explanation of how to correctly set up reverse proxy in the 1Panel environment to achieve efficient and stable multi-site operation.

AnQi CMS Multi-Site Architecture Overview

Firstly, we need to understand the multi-site working principle of Anq CMS. Unlike some traditional CMS, Anq CMS is designed with a simple and efficient system architecture, allowing you toAn individual secure CMS application instanceManage multiple independent websites. This means that no matter how many brand websites, sub-sites, or content branches you have, you do not need to deploy a complete security CMS code and database for each site.This design greatly reduces resource consumption and operational complexity.

Under Docker, this is reflected in the fact that we only need to deploy a secure CMS Docker container. All website requests, regardless of the domain name, will first be received by the reverse proxy server and then forwarded to thisThe same AnQi CMS containerThe AnQi CMS application will automatically identify and render the corresponding website content based on the request headerHostinformation (i.e., the domain name visited by the user).

Deploy the AnQi CMS Docker container (first installation)

Before starting to set up a multi-site reverse proxy, make sure that your server is already installed with the 1Panel management panel, and that OpenResty (as a reverse proxy server) and MySQL (or another database of your choice) are installed in the 1Panel app store.

First, we need to deploy the AnQi CMS Docker container in 1Panel. This step is the foundation for all subsequent multi-site settings.

Select 'Container' in the left menu of the 1Panel panel, then click the 'Container' tab, and click the 'Create Container' button. In the pop-up window, enter a recognizable name for the container, for example,anqicms-main. In the mirror configuration part, select "Enter manually", then enter in the input boxanqicms/anqicms:latest. Port mapping is a critical step. In the "Exposed Port" area, fill in both the "Server Port" and "Container Port".8001. Please note, this8001Is the port that AnQi CMS listens to inside the Docker container, and all external reverse proxies will point to this port. Continue scrolling down, in the "Reboot Strategy" section, select "Reboot after failure" or "Reboot if not manually stopped", to ensure container stability.Finally, click “Confirm” to complete the creation of the container.

After the container is successfully created, you need to set up a reverse proxy for your main site and complete the initial installation of the Aq Enterprise CMS through this domain. For example, the domain name of your main site ismain.anqicms.com, you will create a reverse proxy in the "Website" feature of 1Panel, tomain.anqicms.comproxy to127.0.0.1:8001. After completing the initial installation of AnQi CMS (fill in database information, admin account password, etc.), your main site can be used normally, and you will be able to manage other sub-sites through its admin panel.

configure reverse proxy for the AnQi CMS multi-site

Now, we already have a running Anqie CMS Docker container and have completed the initialization of the main site.Next, we will set up reverse proxy for other sub-sites that need to be deployed.

Assuming you plan to deploy two new sites, the domain names aresite1.anqicms.comandsite2.anqicms.com.

Select 'Website' from the left menu of the 1Panel panel, then click the 'Website' tab, and click the 'Create Website' button.In the pop-up interface, select "Reverse Proxy". In the "Primary Domain" field, enter your first sub-site domain name, for example: site1.anqicms.com. In the "Proxy Address" field,enter the internal address and port of the AnQi CMS Docker container, that is127.0.0.1:8001. Click "Confirm" to complete the reverse proxy setup for the first sub-site.

Repeat the above steps for your second sub-site.site2.anqicms.comCreate another reverse proxy. Similarly, fill in the "main domain".site2.anqicms.comAnd the "proxy address" still points to.The same AnQi CMS Docker container.:127.0.0.1:8001.

Remember, no matter how many secure CMS sub-sites you have, when creating reverse proxies for them in 1Panel, the 'proxy address' should point to the one you deployed.The only secure CMS Docker containerInternal IP and port (usually127.0.0.1:8001).1Panel's OpenResty (Nginx) automatically handles the mapping of domain names to backend services and passes the correctHostheader to the Anqic CMS container.

Add a new site in the Anqi CMS backend

After setting up all domain reverse proxy in 1Panel, the next step is to go to the Anqi CMS backend to actually add the site.

Log in to yourmain sitefor examplemain.anqicms.com/system/The Aiqi CMS backend. Find and click the "Multi-site management" feature in the left menu.Click the "Add new site" button. Fill in the form according to the actual situation of the new site:

  • Site name: Enter a recognizable name, such as "My first sub-site".
  • Site root directoryThis item is very important. Since AnQi CMS runs in a Docker container, it needs a separate directory to store each site's cache, configuration files, and other data.Recommend using AnQi CMS to/app/Start by adding your new site domain (replace the dots in the domain with underscores). For example, if your new site domain issite1.anqicms.com, then fill in/app/site1_anqicms_comMake sure that the root directory name for each site is unique.
  • website addressEnter the complete access URL of the new site, for examplehttp://site1.anqicms.com.
  • Administrator account password: Set up independent backend administration account and password for new site.
  • Database name: Create an independent database for the new site. It is also recommended to use the site domain (dots replaced by underscores) as the database name, for examplesite1_anqicms_com.
  • Duplicate database informationIf you use the default database account information when installing AnQi CMS in Docker, you can usually directly select 'Reuse default database account information'.If you have specific database configuration requirements, you can fill them in manually.
  • Select the template to use: Select a default template for the new site.

Click the “OK” button to complete the creation of the new site after filling in.

Verify and use the new site

After completing all the steps above, your new site has been successfully deployed.

You can access the management interface of the new site directly by clicking the "Access Backend" button next to the new site in the "Multi-site Management" list on the AnQi CMS backend. Or, you can also directly enter the domain name of the new site in the browser, such ashttp://site1.anqicms.com/Then proceedhttp://site1.anqicms.com/system/Access its backend.

In this way, you can easily deploy and manage multiple independent content sites under a single 1Panel environment and a single AnQi CMS Docker container, greatly improving operational efficiency and resource utilization.


Frequently Asked Questions (FAQ)

1. Why do all the Anqi CMS sub-sites in the 1Panel reverse proxy point to the same127.0.0.1:8001port?

This is the core feature of the AnQi CMS multi-site management design.AnQi CMS as a high-performance Go language application, its internal implementation has the ability to distribute different site content according to the request domain.When all external domains forward requests to the same Aanqi CMS container port (for example8001At this time, the reverse proxy server will retain the original request'sHostThe (which is the domain name accessed by the user). The Anqi CMS container will read this after receiving the request.HostHead, and according to the website address you have configured in the "Multi-site Management" background of Anqi CMS, accurately load and render the content and data of the corresponding site.This centralized service model greatly simplifies deployment and operation.

2. Can I deploy a separate Docker container for each Anqi CMS sub-site and have them listen on different ports?

Yes, this is another way to deploy multi-site, but it is suitable if you want each site to haveTotally independent, mutually unaffected Safe CMS instancesThe scenario. If you choose this method, you will need to create an independent Docker container for each safe CMS application in 1Panel, with each container listening on a different port (for example, 8001, 8002, 8003, etc.).Then, when creating reverse proxies for each domain name in 1Panel,代理地址Point to an independent port for the corresponding Docker container (for example,site1.comProxy

Related articles

How to configure reverse proxy for AnQiCMS multi-site in Baota panel?

As a website operator who is well-versed in AnQiCMS operation, I fully understand the challenges you encounter in multi-site management and am well aware of the importance of efficient and stable configurations for business expansion.To configure reverse proxy for AnQiCMS multi-site on Baota panel is a commonly used and effective method to achieve this goal.This allows you to provide content services for multiple different domain names through a single AnQiCMS application instance, greatly simplifying management and maintenance work.This guide will detail how to set up reverse proxy for AnQiCMS multi-site on the Baota panel.

2025-11-06

What are the core advantages of AnQiCMS multi-site management?

As a senior CMS website operation personnel of Anqi, I fully understand the importance of efficiently managing multiple websites for enterprises and content operation teams in an increasingly complex digital ecosystem.The multi-site management feature of AnQi CMS is specifically designed to address this pain point, it is not only a technical feature, but also a strategic tool that brings revolutionary advantages to content operations.The core value of Anqi CMS multi-site management is first reflected in its ability to **manage centrally and uniformly**.

2025-11-06

How to implement AnQiCMS multi-site deployment through reverse proxy?

Hello, as a website operator who is well-versed in the operation of AnQiCMS, I know the importance of efficient content management for both enterprises and individual operators.AnQiCMS with its powerful multi-site management capability provides great convenience to users.Today, I will elaborate on how to implement multi-site deployment of AnQiCMS through reverse proxy technology, helping you to manage multiple brands or content branches more flexibly.## Understanding AnQiCMS Multi-site Deployment and Reverse Proxy AnQiCMS was initially designed with multi-site management needs in mind

2025-11-06

How to

As an AnQi CMS user who deeply understands website operation, I know that an efficient, stable, and powerful content management system plays a decisive role in the success of a website.AnQiCMS, with its Go language genes, stands out among many CMS products, providing an excellent content solution for small and medium-sized enterprises, self-media operators, and multi-site managers.It not only simplifies the complexity of daily operations, but also helps us occupy a place in the highly competitive digital world through its unique technological advantages.The core design concept of AnQiCMS lies in building a lightweight

2025-11-06

Why is it recommended to use reverse proxy for AnQiCMS multi-site deployment?

Hello!As a senior AnQiCMS website operator, I am well aware of all aspects of content management and system deployment.AnQiCMS with its efficient and flexible multi-site management capabilities is indeed a powerful tool for small and medium-sized enterprises and content operation teams.In practice, especially when deploying multiple sites, we strongly recommend using a reverse proxy.This is not just a technical practice, but also a key strategy to ensure the long-term stability, security, and efficiency of the system.

2025-11-06

How to add a new independent site in the AnQiCMS background?

Hello! As a senior AnQi CMS website operations staff, I am very happy to be able to explain to you in detail how to add a new independent site in the AnQiCMS background.The multi-site management function of Anqi CMS is a major highlight in our daily operations, which helps us efficiently manage multiple brands or business branches under the same system, greatly enhancing our work efficiency. ### Understanding Anqi CMS Multi-Site Capabilities Anqi CMS was designed from the outset with the needs of enterprise and content operations teams for multi-site management in mind.It allows users to deploy AnQiCMS in a single environment

2025-11-06

How should the root directory be named and configured when adding a new site to AnQiCMS?

As a professional deeply familiar with AnQiCMS operation, I am very willing to elaborate on the naming and configuration strategy of the root directory when adding a new site in AnQi CMS.Properly planning and setting the site root directory is the key to ensuring the stable operation of the multi-site environment, data security isolation, and convenient subsequent maintenance. ### The Location and Importance of the Site Root Directory In the multi-site management system of AnQiCMS, the site root directory plays a crucial role.It is not just a folder you physically create on the server

2025-11-06

How should the database be independently or reused in the multi-site mode of AnQiCMS?

As an experienced CMS website operation personnel of an information security company, I am very aware of the importance of database strategy in multi-site management.The design of AnQi CMS fully considers this requirement, providing a flexible and efficient database configuration solution to meet the considerations of data independence and reusability under different operational scenarios. ### Database Management Strategy Under AnQiCMS Multi-Site Mode The strength of AnQiCMS lies in its ability to efficiently manage multiple independent websites through a set of core systems. This means you don't need to deploy a full CMS application for each site

2025-11-06