Verify AnQiCMS Docker container status
Before configuring the reverse proxy, it is first necessary to confirm that the AnQiCMS Docker container has started successfully and is running.Even if the one-click deployment was not completely successful, the container itself may have already pulled and attempted to start.
You can view all deployed Docker containers by accessing the "Docker" option in the left menu of the aaPanel panel and then clicking "Container List".On this interface, please carefully check if the AnQiCMS container exists and confirm that its 'status' is displayed as 'running'.If the container is in a 'stopped' state or not listed at all, you will need to manually create and start it.
Manually create AnQiCMS Docker container (if necessary)
If the one-click installation fails to start the AnQiCMS container, you can manually create and run it by following the steps below.
In the Docker management interface of aaPanel, click the 'Create Container' button at the top of the page. In the pop-up configuration window, you need to fill in the following key information:
- NameSet a recognizable name for your AnQiCMS container, for example
anqicms. - Image:Check the “Manual input” option and enter the official Docker image name of AnQiCMS in the input box:
anqicms/anqicms:latest. - Port mappingEnglish: AnQiCMS container listens to the internal by default
8001Port. You need to map this internal port to an unused port on the server. Check "Expose Port" and fill in both the "Server" and "Container" sections.8001(If the 8001 port on the server is occupied, please select a different, unoccupied server port, such as 8002 or 8003, but the 'container' port should still be 8001). - Restart policy:To ensure that the AnQiCMS container can automatically recover after a server restart or unexpected shutdown, it is recommended to select the 'Restart after failure' or 'Restart if not manually stopped' option.
Complete the above configuration and click the “Confirm” button to create a container.The container starts and then listens to the server port specified in the port mapping (e.g., 8001).lsof -i:8001Please replace 8001 with the actual server port you are using to verify whether the port is being listened to.
Manually configure reverse proxy in aaPanel.
After the AnQiCMS Docker container is successfully running and listening on a specific server port (such as 8001), you can then configure reverse proxy for it in aaPanel.
First, click the "WebsiteOn the reverse proxy management interface, click the 'Add Reverse Proxy' button.
- DomainEnter the complete domain name you plan to use to access AnQiCMS website, for example
your.anqicms.com. - Target URLEnglish: Points to the address and port that the AnQiCMS Docker container listens on the local server. This is usually
http://127.0.0.1:8001If you used a different server port when creating the container, be sure to fill in the corresponding port number here.
Confirm all information is correct and then click the "Submit" button to complete the creation of the reverse proxy.
Nginx Advanced Configuration (optional)
In some cases, you may need to configure Nginx reverse proxy more finely to optimize performance, handle specific URL rewrite rules, or resolve compatibility issues.
To add custom Nginx configuration, please find the website you just created for AnQiCMS in aaPanel, and click the 'Settings' button on the right.In the website settings interface, switch to the "Configuration File" tab.You can add or modify instructions in the existing Nginx configuration file.
location @AnqiCMS {
proxy_pass http://127.0.0.1:8001;
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;
}
Please note that if you have added the abovelocationblock, make sure it does not conflict with the other blocks generated automatically by aaPanellocationrules.try_filesAn instruction is a very flexible and powerful feature used to handle various URL requests.Ensure that you click 'Save' and restart the Nginx service after completing the configuration changes to make the new configuration take effect.
Access and initialize the AnQiCMS website
Now, all necessary configurations have been completed. You can enter the domain name you configured in the reverse proxy (for examplehttp://your.anqicms.com/) to access your AnQiCMS website.
first-time