How to configure reverse proxy and domain access since the program listens by default on port 8001

📅 2026-10-13 Unable to translate.

AnQiCMS listens on the default port 8001, when the domain name is accessed for formal launch, it should not carry this port number. The standard approach is to have the program listen internally, with the Web server doing reverse proxying externally: users access 80 or 443, and the proxy layer forwards it to the local port 8001, with the HTTPS certificate also unified at the proxy layer. In this way, port exposure, encryption termination, and static acceleration are all contained in one place, keeping the program itself simple.

Default port and external port分工

8001 is the internal listening port of the program, its existence is to avoid competing with other services on the machine for 80/443; the external port is used by the Web server (Nginx, Apache, or the built-in proxy service of the panel). After confirming the division of labor, the configuration has a clear main line: the firewall only allows 80 and 443, limiting 8001 to only be accessible within the local machine or the internal network, avoiding users bypassing the proxy to directly connect to the port, and also reducing the exposed surface.

Access verification should be done in layers: first, confirm that the local request on the server machine has a response at port 8001, then confirm that the proxy forwarding rules are hit, and finally access from the outside using a domain name. Each section corresponds to a type of fault, and it is not easy to misjudge in sequence.

Reverse proxy needs to forward more than just ports.

The proxy rules not only forward the request to 8001 but also include three sets of information: the real client protocol (X-Forwarded-Proto), the real access domain (Host header), and the visitor IP pass-through header. If the protocol header is missing, the links generated by the background will jump between http and https; if Host is missing, the program cannot determine which domain this request belongs to in the multi-site scenario; if IP pass-through is missing, the logs will all be the address of the proxy itself, and risk control and statistics will be distorted.

In the site configuration of the reverse proxy software itself, fill in the above headers one by one, which is more priority than adjusting the forwarding timeout parameters.

HTTPS termination layer and 301 redirect

The certificate is installed in the proxy layer, allowing the decryption of 443 to occur on the web server, plain text or internal encryption is optional for the internal network to 8001.After installing the certificate, URL convergence should be performed: each address of the http version, as well as the direct connection addresses with :8001 in history, should be redirected to the final https standard domain through 301 redirection.This step can be configured to set up redirect rules in the AnQiCMS backend using 301 redirect management,配合 pseudo-static rules to unify the address form, the unified standard address received by search engines, and there is no need to rely on page-level补救 such as canonical.

When convergence is not done thoroughly, common symptoms are that the search results mix the same site with http, https, and port addresses, and after clicking, there are still jump links. Just go back and check whether the 301 rules at the proxy layer and backend are duplicated or conflicting.

Configuration points under Baota and Docker paths

The deployment method determines where these configurations are written. When using the Baota panel one-click deployment (or the international version aaPanel), the reverse proxy and certificate are completed in the site settings of the panel: create a site, add proxy rules pointing to 8001, one-click apply for a certificate, enable mandatory HTTPS, the entire process does not touch the listening configuration of the program itself, command line deployment under the LNMP environment is also the same point, just write the Nginx configuration.

When taking the Docker route, after starting the container with the official image anqicms/anqicms, map port 8001 to the host's internal port, and place an Nginx or Traefik container in front to take over.80⁄443With the certificate. The key point is not to publish the container port directly to the public network firewall outside, and ensure that the forwarding header configuration of the proxy container is consistent with the above.

No matter which path, make a backup of the current data before you start, you can use the backup to recover as a fallback if there are problems with port and certificate changes, and then return to the original configuration.

Common questions

Q: Can you directly change the program to listen on port 80?A: Yes, but usually there is no need to do so. Directly listening on port 80 may conflict with services on the same machine, and certificate and redirect management are not as clear as placing them all in the proxy layer.

Q: What's the problem with accessing the domain 502?A: It is mostly because the target of proxy forwarding is unreachable: confirm that the container or process is running on port 8001, the firewall allows loopback forwarding on the local machine, and the target port in the port mapping and proxy configuration is consistent.

Q: Do the old addresses with ports and external links need to be handled?A: Yes. Redirect these addresses with 301 to the standard domain name, so that the weight of the existing external links and visitors are all attributed to the main address.

Related articles

After content review blocks the release, how to check and modify the reason for the block?

When content review blocks the release, first determine whether it was intercepted by sensitive word filtering or released after being rewritten with keywords. Investigate by following three steps: column word list, hit records, and text context; there are three methods of modification: correcting the expression, adjusting the word list, and limiting the rules to specific columns. The content generated by AI writing also needs to go through this review chain, and should not be skipped because the source is a model.

2026-10-13

The O&M checklist for the new station launch *days: where are the port monitoring, backup tasks, and logs assigned in each step?

The new station launch follows five fixed steps in *days: confirm service listening (AnQiCMS default port 8001), connect to reverse proxy and domain name, establish a backup task containing static files and practice a recovery once on the day, set up access and error logs, and finally run through the front and back-end functional points. There are slight differences in the landing points of the Baota panel one-click deployment and Docker image paths, which are marked separately in the checklist.

2026-10-13

The upgrade announcement requires backup of files, databases, and custom templates. What is considered secure for each type of backup?

The PbootCMS V3.2.29 upgrade announcement lists 'backing up website files, database, and custom templates' as a prerequisite action, which is a typical requirement for the backup of the three-in-one set in peer CMS systems. This article discusses the verification points one by one: checking the completeness of the file package, ensuring the database can be restored with structure and data in a new instance, and checking whether the front-end style of the custom template returns to the pre-upgrade state; and combining with AnQiCMS's built-in capabilities such as backup data overlay, static file backup, and v3.6.5 template backup expansion to demonstrate the exercise steps.

2026-10-13

After the minor version upgrade, the old version of the table file format is no longer supported, where will the content import process of the site break in several cycles?

A minor upgrade to the data read and write component may directly remove support for the old table format, causing batch import to break at four points: template header, historical files, script connection, and batch tasks. Remedies are arranged in three paths: convert format, keep old files, and change to import interface; AnQiCMS provides a self-check list for ZIP and Excel batch import and import/archive interfaces.

2026-10-13

How to fill in the template fields when importing articles in bulk with Excel to avoid losing content

AnQiCMS supports batch import of documents in ZIP compressed packages and Excel spreadsheets. The Excel channel requires filling out the form according to field rules: the title column is required, the status column determines whether the content goes into draft, pending release, or formal document, and the text and keyword columns correspond to document fields; if there is an error during import, check the draft area and recycling bin first to retrieve, handle duplicate entries after processing, and do not resubmit the entire table directly.

2026-10-13

How to choose container deployment and panel deployment for a corporate website maintained by two people

Two people maintain the corporate website deployment method, evaluating in terms of manpower, rollback, and upgrade: Docker container mode delivers official images, upgrading by changing images, and rollback is to switch back to the old version tag, suitable for teams that operate command processes; Baota panel or aaPanel one-click deployment has a graphical interface in file management, backup tasks, and certificate configuration, suitable for collaborative work with people unfamiliar with the command line. Both methods default to have the program listen on port 8001, and the domain is accessed by reverse proxy forwarding.

2026-10-13

Which step should be done first when moving historical content in the old site restructuring, bulk import or 301 redirect?

The correct order for the reconstruction of the old site is to first import historical content in bulk, then configure 301 redirects: the import should first fall to the draft and be checked in batches, and only after confirming that the address is stable can the old links be redirected to the new address; reversing the order will cause the redirect to point to an empty page. AnQiCMS supports two bulk import methods: ZIP compressed packages and Excel spreadsheets, and deleted items go to the recycle bin, with 301 redirects covering the old links already indexed.

2026-10-13

After changing the pseudo-static rules, will the old links that have been indexed break, and how to make a safety net?

Changing the pseudo-static rules will make the old addresses no longer correspond to the original pages. Whether there will be a broken link depends on whether a list has been made in advance and 301 redirects have been set up. The method is to export the collected addresses before the change, and after the change, map the old addresses to the new addresses by directory prefix or item by item, and then check the sitemap and push results to ensure that there are no large-scale failed addresses in the crawling report.

2026-10-13