How to manually configure reverse proxy to solve the problem after the installation of AnQiCMS fails in aaPanel Docker?

Calendar 👁️ 90

aaPanel Docker installation AnQiCMS failed? Don't worry, manually set up reverse proxy easily!

Hello! As an experienced website operations expert, I know how important efficiency and stability are when deploying a website.AnQiCMS leverages its high-performance architecture developed in Go language, rich and practical SEO features, and flexible content management capabilities, and has become the preferred choice for many small and medium-sized enterprises and content operators.It is not only easy to deploy and efficient in operation, but also can effectively ensure website security.

However, while automation deployment tools are convenient, they occasionally encounter situations where they do not fit well.When we eagerly use Docker to install AnQiCMS with one click in aaPanel, only to find that the website cannot be accessed normally, we often feel a bit frustrated.Don't worry, this is usually not a problem with AnQiCMS itself, but rather the automatic reverse proxy configuration of aaPanel may not have been successfully activated.Today, I will teach you step by step how to manually configure reverse proxy to easily solve this problem and quickly launch your AnQiCMS website!

Why does the automatic deployment occasionally 'fail'?

The aaPanel integrates Docker and reverse proxy features, aiming to simplify the deployment process.In practice, due to various factors such as server environment, network configuration, and resource limitations (such as insufficient memory causing Docker container startup exceptions, or instantaneous communication failures between internal modules of aaPanel), it may result in the automatically created reverse proxy rules not correctly pointing to the AnQiCMS Docker container.When the AnQiCMS container has started normally and is listening on a certain internal port (such as the default one,8001But when external access cannot reach, manually intervening to configure a reverse proxy becomes the most direct and effective solution.

The solution: manually configure a reverse proxy.

After you find that the AnQiCMS website cannot be accessed through the Docker installation of aaPanel, please follow the steps below:

Step 1: Confirm the running status of the AnQiCMS Docker container

Firstly, we need to confirm that the AnQiCMS Docker container has started successfully and is running.

  1. Log in to your aaPanel dashboard.
  2. Click the 'Container' menu on the left navigation bar.
  3. On the 'Container' page, find the namedanqicms(or a container name you customize) container instance.
  4. Check if its status is displayed as 'Running'.If the container is not running, please try to start it manually and check the log (Log) for the specific cause of the failure.If the container is indeed running normally, we can proceed to configure the reverse proxy.

Step two: Create or modify the website reverse proxy.

If the AnQiCMS container is running normally but the website still cannot be accessed through the domain name, then we need to manually configure reverse proxy.

  1. In the left navigation bar of aaPanel, click the 'Website' menu.
  2. If you have previously installed AnQiCMS through the aaPanel Docker application, the system has automatically created a website, and you can click the "Settings" button corresponding to the website to enter the configuration interface.If none, or you wish to recreate, you can click the "Add Site" or "Reverse Proxy" option to create a new site.
  3. In the site settings interface or the site addition wizard, select 'Reverse Proxy' as the website type.
  4. Primary Domain:Enter the domain name you wish to access AnQiCMS, for exampleyour-domain.comortest.anqicms.comMake sure that the domain name has been correctly resolved to the IP address of your server.
  5. Target URL:This is the most critical configuration item. Please set it tohttps://en.anqicms.com.
    • 127.0.0.1Represents the local loopback address, ensuring that requests are routed internally within the server rather than attempting to send them to external networks.
    • 8001Is the default port exposed to the outside by the AnQiCMS Docker container.If you modified the port during installation (for example, to run multiple AnQiCMS instances on the same server), make sure to fill in the actual port you are using.

The third step: Manually configure the Nginx configuration file (recommended)

Although aaPanel will try to generate Nginx configuration based on your settings, we strongly recommend that you manually check and modify the Nginx configuration file to ensure that everything is in place and for finer control.

  1. In the 'Settings' tab of the website you have set up (or a newly created reverse proxy site).

  2. You will see an Nginx configuration file editing box. We need to add or modify the reverse proxy rules required by AnQiCMS. Findservercode blocks, which usually containlisten/server_namecommands.

  3. InserverWithin the code block, find or add a configuration segment like the following Nginx configuration:

    location @AnqiCMS {
        proxy_pass https://en.anqicms.com;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
    error_page 404 =200 @AnqiCMS;
    location / {
       try_files $uri $uri/index.html @AnqiCMS;
    }
    

    Here, I will explain the function of this configuration briefly:

    • location @AnqiCMS { ... }: Defined a namedAnqiCMSThe internal Location block.
      • proxy_pass https://en.anqicms.com;This is the core instruction, it tells Nginx to forward all requests matching this Location to the internal server127.0.0.1:8001The address, which is the address that the AnQiCMS container listens to.
      • proxy_set_header ...These instructions are used to pass the real IP and hostname information of the client to the AnQiCMS application to ensure it can correctly obtain the visitor's information.
    • error_page 404 =200 @AnqiCMS;This line of configuration is a clever trick. When Nginx cannot find the requested static file (returns a 404 error), it will internally redirect to@AnqiCMSThis Location block is equivalent to forwarding the unfound request to AnQiCMS for processing, allowing AnQiCMS to decide how to respond.
    • location / { ... }This is the Location block that handles all root path requests.
      • try_files $uri $uri/index.html @AnqiCMS;This line of instruction tells Nginx that it will try in sequence:
        1. Locate the physical file matching the request URI ($uri)
        2. If the file does not exist, then try to locate the directory matching the URI under (index.htmlthe file ($uri/index.html)
        3. If both of the above are not found, the request will be forwarded to@AnqiCMSThis is the internal Location block, which is forwarded to the AnQiCMS container for processing.The benefit of doing this is that static files (such as images, CSS, JS) can be provided directly by Nginx, improving efficiency, while dynamic content is handled by the AnQiCMS application.
  4. Save and restart Nginx:After the configuration is completed, be sure to click the "Save" button, then go back to the aaPanel homepage, click the "Restart" button next to the Nginx service to make the new configuration take effect.

Step 4: Visit your AnQiCMS website

Now, you can enter the domain name you have set, for examplehttp://your-domain.com/. If everything goes well, you will see the AnQiCMS initial installation interface.

After the installation is complete, the background access address of AnQiCMS is您的域名/system/For example, if your website ishttp://test.anqicms.com/then the back-end access path ishttp://test.anqicms.com/system/. The initial administrator account is usuallyadmin, and the password is123456. After logging in, please change the default password to ensure website security.

Summary

Although the Docker automation deployment feature of aaPanel is powerful, understanding and manually configuring the reverse proxy is the key to solving problems when unexpected situations occur.By following these steps, you not only solved the deployment problems of AnQiCMS, but also deepened your understanding of how Docker containers and web servers (Nginx) work together.Hope this comprehensive guide can help you successfully build and operate your AnQiCMS website!


Frequently Asked Questions (FAQ)

  1. Why can't I pass directlyhttp://服务器IP:8001Visit AnQiCMS?Generally speaking,8001The port may not be directly exposed to public network access or limited by the server firewall (such as the built-in firewall of aaPanel or the security group of the cloud service provider).In addition, accessing directly using IP and port is not convenient for search engine optimization (SEO), and it is also not possible to configure an SSL certificate for HTTPS access.The role of reverse proxy is to standardize80(HTTP) or443Requests for (HTTPS) ports, forwarding to the internal port of the AnQiCMS container based on the domain, while handling SSL certificates, hiding the backend service port, and other functions, thus providing a safer, more professional, and more advantageous environment.

Related articles

How is the installation process for deploying AnQiCMS Docker application with aaPanel one-click?

As an experienced website operations expert, I am well aware of the importance of efficient and stable website deployment for any content operation project.Especially at the moment, Docker container technology and integrated management panels like aaPanel have brought us unprecedented convenience.Today, let's delve into how to take advantage of the powerful features of aaPanel and easily achieve one-click deployment of AnQiCMS Docker applications.

2025-11-06

How to configure a reverse proxy site for AnQiCMS container deployed with Docker in 1Panel?

As an experienced website operation expert, I am happy to give you a detailed explanation of how to configure reverse proxy sites for AnQiCMS containers deployed in the 1Panel environment, so that your website runs professionally and efficiently. --- ## In 1Panel, configure reverse proxy for AnQiCMS container deployed using Docker: Get your website up professionally!

2025-11-06

What are the detailed steps for installing AnQiCMS using 1Panel Docker?

As an experienced website operation expert, I am well aware of the importance of an efficient and easy-to-use content management system for both enterprises and individual operators.AnQiCMS (AnQiCMS) with its high performance brought by the Go language, rich SEO tools, and excellent multi-site management capabilities, has become the first choice of many users.When AnQiCMS encounters a modern server operation and management panel like 1Panel, the ease of deployment has reached a new height.

2025-11-06

How to change the default administrator account and password after installing AnQiCMS to enhance security?

As an experienced website operations expert, I am well aware of the importance of website security in daily operations, especially in the early stages of system installation, many details may become potential security risks.AnQiCMS is an enterprise-level content management system dedicated to providing efficient, secure, and customizable services, considering security from the beginning of its design.However, the initial settings are often adopted for convenience and use default values, which requires us to take immediate action after installation to ensure the security and stability of the website.

2025-11-06

How to install MySQL in the Baota panel Docker environment for AnQiCMS usage?

AnQiCMS (AnQiCMS) is a powerful helper for small and medium-sized enterprises and content operation teams with its high-performance, modular design based on the Go language and enterprise-level features, quickly becoming a reliable assistant.It is committed to providing an efficient, customizable, and easy-to-expand content management solution. Whether you are building a corporate website, a marketing website, or managing multiple sites, AnQiCMS can handle it with ease.As the core of the content management system, the database plays a vital role, responsible for storing and managing all the content and configurations of the website.

2025-11-06

How to obtain and fill in the MySQL root password when installing AnQiCMS with Baota panel Docker?

## AnQiCMS Docker installation using Panel: Easily obtain and fill in the MySQL root password guide As an experienced website operations expert, I am well aware that how to efficiently and accurately handle database configuration is the key to success when quickly deploying a content management system.AnQiCMS (AnQiCMS) has won the favor of many small and medium-sized enterprises and self-media operators with its efficient and concise features based on the Go language.Installing AnQiCMS through the Docker container feature of Baota panel is undoubtedly an efficient way to achieve this goal. However

2025-11-06

What does it mean to reuse database information when adding a new site in the background of AnQiCMS deployed by Docker?

As an experienced website operations expert, I am well aware that an efficient and flexible content management system is the key to a company's success in an increasingly complex network environment.AnQiCMS, with its high-performance architecture in Go language and multi-site management capabilities, has become a powerful assistant for many operators.Especially when combined with container technologies like Docker, the convenience of deploying and managing websites is greatly enhanced.

2025-11-06

How AnQiCMS v2.x users can smoothly upgrade to v3.x version?

How do users of the v2.x version of AnQi CMS smoothly upgrade to the v3.x version?Deep Analysis and Practical Guide As an experienced website operations expert, I am well aware of the importance of a stable and efficient CMS system for business.AnQiCMS (AnQiCMS) has become a powerful assistant for many small and medium-sized enterprises and content operation teams with its efficient architecture in Go language and rich features.With AnQiCMS continuously iterating and upgrading, the v3.x version brings more powerful performance, simplified deployment, and a more unified management experience.

2025-11-06