As an experienced website operations expert, I know that the stable operation of the Content Management System (CMS) is the foundation of website success.AnQiCMS (AnQiCMS) provides us with powerful content management capabilities with its efficient features based on the Go language.However, like many high-performance applications, AnQiCMS usually runs on non-standard ports, such as the default port 8001.This means that if users access directly, they need to enter a URL with a port number, which is not convenient and may also affect user experience and SEO.

At this moment, the reverse proxy becomes the key bridge connecting users to the AnQiCMS backend.It is like an intelligent 'guardian', securely and efficiently forwarding requests from external standard ports (such as 80 or 443) to the AnQiCMS service running internally.For those who have deployed AnQiCMS on Baota panel, correctly configuring reverse proxy is essential for ensuring normal access to the backend, improving website security, and enhancing SEO performance.

Why is reverse proxy so crucial?

Before delving into the configuration, let's first understand the value of reverse proxy.When your AnQiCMS application starts on the server, it may be listening on a specific port, such as 8001.http://yourdomain.com:8001/system/Only then can you enter the background. This is clearly not the access method we want.

A reverse proxy server (usually Nginx or Apache) is deployed at the front end, it listens to the standard 80 port (HTTP) or 443 port (HTTPS). When a user requestshttp://yourdomain.com/system/At that time, the request first arrives at the reverse proxy. The reverse proxy will forward this request to the AnQiCMS running in actual operation according to the rules you set.http://127.0.0.1:8001On the address, and the content returned by AnQiCMS is sent back to the user.

The benefits of doing this are obvious:

  • Unified access entrance:Users do not need to remember complex port numbers, access directly through the domain name.
  • Enhance security:Hid the real IP and port of AnQiCMS, reducing the risk of direct exposure to the public network. Reverse proxy can handle external threats and protect the backend application.
  • Easy to deploy SSL certificates:SSL certificates are typically deployed on reverse proxy servers, where they handle HTTPS encryption and decryption. AnQiCMS itself does not require additional SSL configuration, reducing maintenance complexity.
  • Load balancing and caching:Although a single AnQiCMS instance may not need it temporarily, reverse proxy is naturally equipped with these capabilities, providing possibilities for future expansion.

Operation steps on the Baota panel, easy to handle!

Configure reverse proxy on the Baota panel, the process is very intuitive and convenient.Assuming you have installed AnQiCMS via Docker on the Baota panel and it is running on the default port 8001, your domain has also been resolved to the server IP.

  1. Log in to the Baota panel:First, please log in to the Baota panel with your administrator account.

  2. Enter the 'Website' management:After successful login, you will see the "Website" option in the left navigation bar. Click on it to enter the website management interface.

  3. Create or edit a website:

    • If you have not yet created a website for your domain, please click the "Add Site" button and enter your domain (for example,yourdomain.com), a database and FTP can be temporarily not created or selected based on the database information used during the installation of AnQiCMS Docker.
    • If your domain website already exists, directly find the corresponding domain, click the "Settings" button on the right.
  4. Configure reverse proxy:

    • In the website settings interface, you will see multiple tabs. Please find and click the 'Reverse Proxy' tab.
    • Click the 'Add Reverse Proxy' button.
  5. Enter reverse proxy information:In the pop-up settings window, you need to fill in several key pieces of information:

    • Proxy name:This is an internal identifier, you can fill in a name that is easy to recognize, such as "AnQiCMS Backend Agent".
    • Target URL:This is the actual address and port where AnQiCMS service runs. Since AnQiCMS runs on the server internally, we usually use the local loopback address127.0.0.1plus its default port8001. Please fill in herehttp://127.0.0.1:8001.
    • Send domain:It is recommended to keep the default setting, usually check 'Send real Host header' to ensure that the backend AnQiCMS receives the correct domain information.
  6. Save and Enable:After confirming that the information is correct, click the "Submit" button to save the settings. At this point, your reverse proxy rules have already taken effect.

Verify and Use

After configuration is complete, it\'s time to verify. Open your browser and enter your domain name plus the AnQiCMS backend path, for examplehttp://yourdomain.com/system/.If everything is configured correctly, you should be able to smoothly see the AnQiCMS admin login interface.This indicates that the reverse proxy has successfully forwarded the external request to the internal AnQiCMS service, and the backend can be accessed normally!

Some essential configuration details and tips

  • The deployment of SSL certificates:It is strongly recommended to enable HTTPS for your website.In the Baota panel, you can easily deploy a free Let's Encrypt certificate in the 'Website' settings tab.https://yourdomain.com/system/Access the backend securely. The reverse proxy will forward HTTPS requests to HTTP requests for AnQiCMS (i.e.http://127.0.0.1:8001This is a standard and safe practice, because AnQiCMS and the reverse proxy are on the same server internally, and communication is secure.

  • **AnQiCMS's