As an experienced CMS website operation person, 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 filling of the "Target Address" directly determines whether the user's request can be accurately delivered to your AnQiCMS application.

Understanding 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 to a specific port to handle incoming requests.When you deploy AnQiCMS on the Baota panel, especially when installing through the Docker container method, AnQiCMS usually runs independently inside the container or on some port of the server.This port is open to the server internally, not directly facing the public network.

The reverse proxy function of the Baota panel plays the role of a 'traffic director'.It receives domain requests from external sources (user browser) and then forwards these requests to the ports that the AnQiCMS server is actually listening on.So, external users do not need to know the specific port of AnQiCMS internally, they can access your website just by using the domain name.

Specification for filling in the 'Target Address' in Baota panel reverse proxy

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

The structure of this address includes two key pieces of information:

  • http://127.0.0.1: This represents the local loopback address, commonly known as 'localhost'.It tells 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's reverse proxy service.
  • :8001: This specifies the port that 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 the server's port 8001.Therefore, the reverse proxy needs to forward the request to this specific port.

Deployment of target address under multi-site

AnQiCMS project has a significant advantage of supporting multi-site management.If you have deployed multiple AnQiCMS instances on the same server (even if they are the same AnQiCMS program, created through its multi-site feature), each independent AnQiCMS site will occupy a unique internal port during runtime.

  • 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 the reverse proxy should behttp://127.0.0.1:8002.
  • Each new site created by the AnQiCMS multi-site feature needs to set up a corresponding reverse proxy in the Baota panel, and the port number in the 'Target Address' should match the actual listening port configured in the 'Multi-site Management' of the AnQiCMS backend, or the port mapped out by the Docker container.

Through such configuration, Baota panel can intelligently route requests of different domain names to AnQiCMS site instances running on different internal ports, thereby realizing 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 'Destination 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 'Destination Address' accordingly.http://127.0.0.1:您AnQiCMS实际监听的端口.

Q2: Why should the "target address" be used127.0.0.1instead of my public IP address?A2:127.0.0.1is a special IP address representing the local machine. When your AnQiCMS application and Baota panel's reverse proxy service are running on the same server, use127.0.0.1It can ensure that the request is forwarded internally on the server, avoiding unnecessary network hops, improving communication efficiency and security.It represents 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' when creating a new site in the 'Multi-site Management' section of the AnQiCMS backend and the 'Target Address' of Baota Reverse Proxy?A3: AnQiCMS backend “Multi-site Management” section “Website Address” is the URL that users access your sitePublic network access domain name[for example]http://dev.anqicms.comIt is the address input by the external user in the browser. The 'target address' of Baota reverse proxy is the address that AnQiCMS listens to internally on the server.Internal IP and port[for example]http://127.0.0.1:8002),This is the actual internal service address to which the reverse proxy forwards external requests. Both play different roles, but they both need to be properly configured to ensure that your website runs smoothly.