As an experienced CMS website operation personnel for a security company, I know that the configuration of reverse proxy is the key to ensure the efficient and stable operation of the website when managing multiple sites on the Baota panel.The correct entry of the 'target address' directly determines whether the user's request can be accurately delivered to your AnQiCMS application.

Understand the working principle of AnQiCMS and reverse proxy

AnQiCMS, as an enterprise-level content management system developed based on the Go language, runs on the server and listens on a specific port to handle incoming requests.When you deploy AnQiCMS on Baota panel, especially through Docker container installation, AnQiCMS usually runs independently within the container or on some port of the server.This port is open to the server internally, not directly facing the public network.

The Baota panel's reverse proxy function acts as a "traffic commander".It receives domain name requests from external (user browser) and then forwards these requests to the internal port that AnQiCMS is actually listening on.This way, external users do not need to know the specific port inside AnQiCMS, they can access your website simply by domain name.

Specification for filling in the 'target address' of Baota panel reverse proxy

When adding AnQiCMS multi-site reverse proxy in Baota panel,“Target Address”should be filled in ashttp://127.0.0.1:8001.

This address consists of two key pieces of information:

  • http://127.0.0.1This represents the local loopback address, commonly known as 'localhost'.It informs the reverse proxy that the request needs to be forwarded to this server.This means that your AnQiCMS application is running on the same server as the Baota panel reverse proxy service.
  • :8001This specifies the port that the AnQiCMS application listens on internally.According to the default configuration of AnQiCMS and the guidance in the Baota Docker installation tutorial, the AnQiCMS container usually maps its service port to port 8001 on the server.Therefore, the reverse proxy needs to forward the request to this specific port.

Adjustment of target address under multi-site deployment

A significant advantage of the AnQiCMS project is that it supports multi-site management.If you deploy multiple AnQiCMS instances on the same server (even if they are the same AnQiCMS program, created through its multi-site feature to create different sites), each independent AnQiCMS site will occupy a unique internal port when running.

For example, if you follow the tutorial "Adding multiple sites to AnQi CMS through reverse proxy", you may use the default port 8001 for the main site, and allocate different internal ports such as 8002, 8003, etc. for the second, third, and subsequent sites.In this case, when configuring a reverse proxy for each new site, the "target address" must match the actual internal port that the site is listening on.

  • For the first site (usually the default installation), the target address ishttp://127.0.0.1:8001.
  • For the second site, if it is configured to listen on port 8002, then the target address of its reverse proxy should behttp://127.0.0.1:8002.
  • As a continuation, each new site created by the AnQiCMS multi-site feature must be set up with a corresponding reverse proxy in the Baota panel, and the port number in the "destination address" should match the actual listening port configured in the "multi-site management" of the site in the AnQiCMS backend (or the port mapped by the Docker container) exactly.

By such configuration, Baota panel can intelligently route requests from different domain names to AnQiCMS site instances running on different internal ports, thereby achieving efficient multi-site management.

Frequently Asked Questions

Q1: If my AnQiCMS is not listening on port 8001, how should I fill in the 'target address'?A1: If your AnQiCMS instance (whether it is the main site or a new site created through the multi-site feature) is configured to listen on other ports, such as 8002, 8003, or even other custom ports, then the port number in the "target address" must also be modified accordingly. You can confirm the actual listening port in the AnQiCMS backend configuration (such as the site configuration in the multi-site management interface or the port mapping settings of the Docker container) and then fill in the "target address" as followshttp://127.0.0.1:您AnQiCMS实际监听的端口.

Q2: Why should 'target address' be used127.0.0.1instead of my public IP address?A2:127.0.0.1It is a special IP address representing the local machine. When your AnQiCMS application and the Baota panel reverse proxy service are running on the same server, use127.0.0.1Ensure that the request is forwarded internally within the server, avoiding unnecessary network hops and improving communication efficiency and security.It means that the reverse proxy will send the request back to the machine it is on, rather than sending it to the external network.

Q3: What is the difference between the "website address" and the "target address" when creating a new site in the "Multi-site Management" section of the AnQiCMS backend?A3: The 'Multiple Site Management' in AnQiCMS backend, the 'Site Address' is the one facing users of your sitePublic access domainfor examplehttp://dev.anqicms.com), it is the address entered by external users in the browser. The "target address" of Baota reverse proxy is AnQiCMS listening internallyInternal IP and portfor examplehttp://127.0.0.1:8002This is the actual internal service address where the reverse proxy forwards external requests. Both play different roles and need to be correctly configured to ensure the smooth operation of your website.