How to set up port mapping and reverse proxy for AnQiCMS Docker container in Panel?

Calendar 👁️ 90

As a senior CMS website operation personnel of an enterprise security company, I fully understand the importance of efficient deployment and stable operation for any content management system.In the modern web environment, Docker container deployment is favored for its convenience, isolation, and portability.The AnQi CMS combined with Docker can provide you with a powerful and flexible content management platform.This article will elaborate on how to set port mapping and reverse proxy for AnQiCMS Docker container under Panel environment, ensuring that your website can be accessed smoothly.

Deploy AnQiCMS Docker container and port mapping

In the Panel environment (such as 1Panel or aaPanel), deploying the AnQiCMS Docker container is the first step to start the website.The core of this process lies in correctly mapping the service port inside the container to the port on the host.AnQiCMS listens on port 8001 by default inside a Docker container.

First, you need to access your Panel interface and find the 'Container' or 'Docker' management module.Here, you will usually find an option to 'create a container' or 'add a container'.

Container name can be set freely according to your preference, for example “anqicms-instance-1”. In the “Image” or “Image” option, you need to manually enter the official Docker image name of AnQiCMS, that isanqicms/anqicms:latest.

The next is the crucial 'port mapping' setting.The panel interface usually provides options such as "Expose ports" or similar.Here, you need to specify two ports: Host Port and Container Port.8001. Host port, this is the open port on your server. If you are running only one AnQiCMS instance, you can fill it in directly8001If you plan to run multiple AnQiCMS instances on the same server, each instance needs a unique host port, for example8002/8003to avoid port conflicts.

After completing the port mapping setup, it is usually necessary to configure the container's restart policy, such as selecting 'restart after failure' or 'restart if not manually stopped', to ensure that the service can automatically recover in case of an unexpected interruption.Finally, confirm and create the container, waiting for Docker to complete the download of the image and the startup of the container.

Configure reverse proxy to access AnQiCMS via domain

After the AnQiCMS Docker container is started and port mapping is completed, you can access it through服务器IP:宿主机端口Access directly in the way.However, in order to provide user-friendly access methods and implement more advanced features (such as SSL encryption, multi-domain management), we usually configure reverse proxies.The reverse proxy forwards the user's domain request to the internal Docker container port.

In the Panel, you need to go to the 'Website' or 'Web Service' management module, select 'Create Website' and choose the 'Reverse Proxy' type. Here, you need to configure the following information:

Enter the domain name you have prepared for the AnQiCMS website, for exampleyourdomain.comorcms.yourdomain.comMake sure that the domain name has been correctly resolved to your server IP address.

The 'Proxy Address' or 'Target Address' field is crucial for reverse proxy, it tells the web server where to forward the request. Here you need to fill in127.0.0.1:宿主机端口. Among them,127.0.0.1refers to your local server address, and宿主机端口It is the host port that you map for the AnQiCMS Docker container when deploying (for example, if you are mapping8001, here you fill in127.0.0.1:8001)

If you run multiple AnQiCMS Docker containers on the same server and each container maps to a different host port (for example8001/8002Then you can configure a separate reverse proxy for each container, directing different domains to different127.0.0.1:宿主机端口to achieve the deployment of multiple AnQiCMS websites.

After completing these configurations, save and create the website. Panel will automatically configure reverse proxy rules for Nginx or OpenResty and other web servers.

Website initialization and management

After the reverse proxy is configured, you can enter the domain you have configured in the browser to access the AnQiCMS initialization installation interface.Complete database connection, admin account setup, and other steps according to the prompt, and your AnQiCMS website will run normally.

The backend management address of Anqi CMS is usually您的域名/system/. For example, if your domain name isyourdomain.com, then the backend access path will beyourdomain.com/system/.When logging in for the first time, please change the default administrator account and password to ensure website security.Deploy and manage AnQiCMS Docker container and reverse proxy via Panel, greatly simplifying the deployment process, allowing you to focus more on content creation and website operations.

Frequently Asked Questions

Q1: When I try to access my domain, the AnQiCMS website cannot be opened, showing "502 Bad Gateway" or connection error, how can I troubleshoot?A1: This usually means that the reverse proxy failed to connect to the AnQiCMS Docker container.You should first check if the Docker container is running, you can view its status through the container management interface of Panel.If the container is not running, please try to start it and check the logs for error information.Next, confirm that the "proxy address" in the reverse proxy settings matches the "host port" of the Docker container, and that this port is not occupied by other services on the server.Finally, check the server firewall settings to ensure that the host port allows traffic through.

Q2: How should I configure if I want to run multiple AnQiCMS websites on the same server, each using a different domain?A2: To deploy multiple AnQiCMS websites, you need to deploy an independent AnQiCMS Docker container for each website.Each container should be mapped to a different, unused port on the host machine at creation time (for example, the first container maps to 8001, the second container maps to 8002, and so on).127.0.0.1:宿主机端口For example,domain1.comPoint to127.0.0.1:8001,domain2.comPoint to127.0.0.1:8002.

Q3: What is the difference between the multi-site management feature provided by AnQiCMS backend and the aforementioned multiple Docker container deployment method?A3: The "Multi-site Management" feature of the AnQiCMS backend allows you to manage aa singleAnQiCMS application instance manages multiple independent logical sites.This means you only need to run one AnQiCMS Docker container, but through the background configuration, it can display different contents and templates based on different domain names.multipleAn independent AnQiCMS application instance, each instance is completely isolated from the others, with its own database and configuration, more suitable for those with higher requirements for isolation or teams that operate multiple projects independently.Generally, if you need to run multiple independent CMS, you would choose multiple Docker containers; if you want to manage multiple related websites in the same CMS, you would choose the built-in multi-site feature of AnQiCMS.

Related articles

How to use Docker to install and deploy AnQiCMS on 1Panel?

As an experienced website operator, I am well aware of the importance of an efficient and easy-to-manage content system for both enterprises and individual operators.AnQiCMS (AnQiCMS) is an ideal choice for many users seeking stable, flexible content solutions with its high-performance, modular design and rich built-in features based on the Go language.It not only deploys easily, with an elegant interface, but also excels in security and SEO-friendliness, meeting the needs of various content management requirements for corporate websites, marketing websites, and even personal blogs.

2025-11-06

What should I do if I encounter port occupation problem during AnQiCMS installation?

As a website operator who has been deeply involved in AnQiCMS for many years, I know that even a small technical detail can become a stumbling block for users to successfully go online.Among them, port occupation problems are typical scenarios often encountered when initially installing or expanding AnQiCMS.Today, let's delve into how to efficiently identify and resolve port occupation issues when installing AnQiCMS.Understanding Port Usage Problem First, let's understand what port usage is.In network communication

2025-11-06

How do MacOS users install and test AnQiCMS?

As an experienced enterprise CMS website operator, I know the importance of content management systems for enterprises and self-media.AnQiCMS stands out among many CMS systems for its efficiency, flexibility, and security.For MacOS users, the simple deployment process makes local development and testing particularly convenient.Now, I will give you a detailed introduction on how to install and test AnQiCMS on MacOS.

2025-11-06

How to safely stop or close the AnQiCMS program running on Windows?

As an experienced website operator who deeply understands the operation of security CMS, I am fully aware of the importance of program security, stable operation, and the ability to stop safely when necessary.Whether it is for system maintenance, version upgrade, or daily development and testing, correctly shutting down the AnQiCMS program is a critical step to ensure data integrity and system stability.Under Windows operating system environment, stopping or closing the AnQiCMS program is usually a direct process.Because AnQiCMS is an independent executable file developed based on the Go language

2025-11-06

How to deploy AnQiCMS Docker application with aaPanel one-click?

As an experienced CMS website operation person in an enterprise, I am well aware of the importance of an efficient and stable content management system for both enterprises and individual operators.AnQi CMS, with its high concurrency characteristics of the Go language, concise architecture design, and in-depth optimization for SEO, has become the preferred choice for many small and medium-sized enterprises and self-media teams.

2025-11-06

How to manually configure reverse proxy after AnQiCMS Docker deployment fails on aaPanel?

In the daily operation of AnQiCMS, we deeply understand that stable and efficient content release is the foundation of success.When you try to deploy AnQiCMS through Docker in the aaPanel environment, you may occasionally encounter a situation where the automated reverse proxy configuration fails.This is usually not a fatal problem, but requires us to manually intervene and calibrate the configuration to ensure that AnQiCMS can provide normal external service through your domain.

2025-11-06

How to configure MySQL database when installing AnQiCMS via Baota panel Docker?

As a senior security CMS website operator, I know that a stable and efficient CMS system cannot do without the robust support of its underlying database.Deploying AnQiCMS in the Docker environment of Baota panel not only simplifies the installation process but also provides an isolated, secure, and easy-to-manage application environment.Properly configuring the MySQL database is undoubtedly a key step to ensure the normal operation and data security of AnQiCMS.

2025-11-06

What are the specific field requirements for adding a new site in the AnQiCMS multi-site management?

As an experienced CMS website operation personnel, I fully understand the importance of the content management system in multi-site operations.AnQiCMS with its efficient and customizable features, provides us with great convenience in managing multiple brands or content branches.Adding a new site in AnQiCMS is a common operation that allows us to centralize the management of different sites into a single system.The following will elaborate on the specific requirements of the system for each field when adding a new site in AnQiCMS multi-site management.

2025-11-06