How to configure reverse proxy through 1Panel when installing AnQiCMS with Docker?

Calendar 👁️ 187

An QiCMS, as an enterprise-level content management system developed based on the Go language, is an ideal choice for small and medium-sized enterprises and content operation teams with its high efficiency, security, and ease of use.Combine 1Panel, a convenient server management panel, and deploy AnQiCMS containerized by Docker to greatly simplify the installation and maintenance process.To enable AnQiCMS to access through a custom domain and hide its internal running port, configuring reverse proxy is an essential step before the website goes into operation.This guide will detail how to configure reverse proxy for AnQiCMS deployed in the 1Panel environment.

Before starting the configuration, please make sure that your server has successfully installed the 1Panel management panel.1Panel provides a convenient app store, you need to install OpenResty (as a web server) and MySQL (as a database service), both of which are essential for AnQiCMS to run.If 1Panel has not been installed yet, please refer to its official documentation to complete the installation.

Deploy AnQiCMS Docker container

In the 1Panel management interface, navigate to the "Container" section of the left menu, select the "Container" tab, and then click the "Create Container" button. In the pop-up configuration interface, name the container, for exampleanqicmsIn the "Mirror" option, select "Manual input" and then enter in the input boxanqicms/anqicms:latest.

Regarding port configuration, select 'Expose Port' and set both 'Server Port' and 'Container Port' to8001. It is important to note that if you plan to run multiple AnQiCMS instances on the same server, each instance's 'server port' should be set to a different, unused value (such as8002/8003),but the corresponding “container port” should still be8001,because this is the service listening port inside the AnQiCMS container.

Continue scrolling down, at the 'Restart Strategy' section, it is recommended to select 'Restart after failure' or 'Restart if not manually stopped', to ensure that the service can recover automatically after abnormal exit.After completing the above configuration, click the "Confirm" button to create and start the AnQiCMS container.

Configure AnQiCMS reverse proxy site

Successfully created AnQiCMS container, next you need to configure reverse proxy in 1Panel to access it through the domain name you have set up.In the left menu of 1Panel, click the 'Website' option, select the 'Website' tab, and then click the 'Create Website' button.

In the pop-up interface, select the 'Reverse Proxy' type. In the 'Primary Domain' field, enter the domain name you wish to use to access AnQiCMS, for exampletest.anqicms.comEnsure that this domain name is correctly resolved to your server IP address. In the 'Proxy Address' field, fill in127.0.0.1:8001. Here127.0.0.1Represents the local loopback address of the server, and8001It is the 'server port' exposed to the outside when you create a Docker container.If you have previously set different server ports for multiple AnQiCMS containers, please make sure that the port you enter here matches the actual 'server port' of the AnQiCMS container you want to proxy.Finally, click the "Confirm" button to complete the creation of the reverse proxy site.

Complete the initialization installation of AnQiCMS

After the reverse proxy configuration is complete, you can access the domain you set via your browser, for examplehttp://test.anqicms.com/At this time, AnQiCMS will guide you to the initialization installation interface.Fill in the database information as prompted (make sure it matches the MySQL configuration you installed in the 1Panel app store), set up the admin account and password, and confirm the website address.After completing these steps, AnQiCMS can run normally.The backend management address of AnQiCMS is usually added to your domain name/system/For examplehttp://test.anqicms.com/system/. Please make sure to properly store your backend account information.

By combining 1Panel with Docker to deploy AnQiCMS and configure reverse proxy, it not only simplifies the technology stack and improves deployment efficiency, but also provides a unified entry and basic security protection for the host.This deployment method allows website operators to focus more on content creation and business development, without delving into complex server configurations.


Frequently Asked Questions (FAQ)

Question: Why do I need to configure a reverse proxy?

Answer: Configuring a reverse proxy allows you to access it through a custom domain (for exampleyourdomain.com) rather than IP address and port (for example192.168.1.1:8001Visit AnQiCMS. This not only improves user experience and makes the website address more professional, but also can hide the internal service port to some extent, increase security, and lay a foundation for advanced features such as HTTPS configuration, load balancing, and CDN acceleration in the future.

Question: How to configure reverse proxy if I install multiple AnQiCMS containers?

Answer: When you install multiple AnQiCMS Docker containers, each container needs to expose a unique 'server port' in 1Panel (for example,8001,8002,8003), and the internal port of the container is usually maintained as8001. When configuring reverse proxy in 1Panel, you need to create a separate website for each AnQiCMS instance and make sure that the "proxy address" of each website points to the corresponding "server port" of the instance (for example127.0.0.1:8001Corresponding to the first instance,127.0.0.1:8002At the same time, using different main domains or subdomains to distinguish access.

Ask: After configuring the reverse proxy, how should I troubleshoot if the website access fails?

Answer: First, check if your domain resolution is correctly pointing to the server IP.Next, confirm that the AnQiCMS Docker container is running normally in 1Panel, and you can check the status and logs through the container management interface of 1Panel.Then, check if the 'proxy address' port in the reverse proxy configuration is consistent with the 'server port' exposed by the Docker container.At the same time, check whether the server firewall (including the firewall settings of 1Panel itself and the security group rules of the cloud service provider) allows external access80443Port, as well as the ports exposed by the container. Finally, you can check the website logs and container logs of 1Panel, which usually provide detailed error information to help you diagnose the problem.

Related articles

How to configure the new site root directory for AnQiCMS multi-site deployment to achieve data isolation?

As an experienced security CMS website operator, I am well aware of the core role of the content management system in today's digital marketing.Especially when facing the needs of multi-site operations, the powerful functions and flexible configuration provided by AnQiCMS are undoubtedly our reliable assistant.Among them, how to properly configure the root directory of a new site to achieve data isolation is a key link to ensure the efficient and safe operation of multiple sites.

2025-11-06

How to deploy multiple independent AnQiCMS sites on the same physical server?

In the rapidly changing digital age, businesses and content operators often face the challenge of managing multiple websites.AnQiCMS (AnQiCMS) is an efficient content management system developed based on the Go language, and its multi-site management function is exactly designed to solve this pain point.As an experienced website operator proficient in AnQi CMS, I am well aware of the readers' desire for efficient and convenient solutions.Today, I will elaborate on how to deploy multiple independent security CMS sites on the same physical server, helping you optimize resources and simplify management.## Start Your Multi-Site Journey

2025-11-06

How to use the stop script `stop.sh` written by author fesion in AnQiCMS?

AnQiCMS (AnQiCMS) is a high-efficiency and feature-rich Go language content management system, its stable operation cannot do without refined deployment and management.As a website operator, we not only need to pay attention to content creation and optimization, but also ensure the smooth operation of the system backend.In this case, the stop script `stop.sh` plays a crucial role, which can help us safely and effectively manage the lifecycle of AnQiCMS services.### Core function to stop the script `stop.sh` `stop

2025-11-06

What is the main function of the startup script `start.sh` written by "author fesion" in the AnQiCMS task schedule?

In the daily operation of AnQiCMS (AnQiCMS), the stable operation of the system is the key to ensuring user experience and content distribution efficiency.To ensure that the AnQiCMS service can provide content continuously and uninterruptedly, even if it encounters unexpected interruptions and can recover quickly, a meticulously designed startup script plays a crucial role in the scheduled tasks.Among them, the `start.sh` script written by "author fesion" was born for this purpose, and it constitutes the core of the self-protection mechanism of AnQiCMS service.### `start

2025-11-06

Install AnQi via Docker on aaPanel

Anq CMS is an enterprise-level content management system based on the Go language, designed to provide an efficient, customizable and easy-to-expand content management solution.As a website operator familiar with content creation and optimization, I understand how important a stable and efficient system is.This article will give a detailed introduction on how to use the Docker function of the aaPanel to quickly deploy the Aq CMS, helping you build and start your website efficiently.

2025-11-06

What is the real meaning of checking if the PID exists in the AnQiCMS startup script?

As an experienced security CMS website operations personnel, I know that the logic behind each system component is crucial for the stable operation and efficient management of the website.The startup script serves as the starting point of the application lifecycle, its design often embodies considerations for system robustness and operational convenience.Now, let's delve into the true significance of the "check if PID exists" section in the Anqi CMS startup script.

2025-11-06

How to determine if the AnQiCMS process is running on the server?

As an expert who deeply understands the operation of AnQiCMS, I am well aware of the importance of stable system operation for website business.Determine whether the AnQiCMS process is running normally on the server, which is a basic and crucial task in daily operations.It is crucial to accurately grasp the process status, whether it is to investigate website access failures or to confirm whether the scheduled tasks are effective.

2025-11-06

Why does the AnQiCMS startup script use `ps -ef | grep | wc -l` to check the PID?

As an experienced CMS website operation personnel of an enterprise, I know that the stable operation of the system is of great importance to content publishing and user experience.AnQi CMS, with its high efficiency, lightweight, and easy deployment features, has won the favor of many small and medium-sized enterprises and content operation teams.However, even the most excellent system needs a reliable startup and maintenance mechanism to ensure its continuous online operation.Among them, the `ps -ef | grep | wc -l` command used in the startup script to check the PID, although it looks a bit complex, it is the key to ensuring the stable operation of the Anqi CMS.

2025-11-06